Rasterize - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


ImageTools

  

Rasterize

  

rasterize vector graphics to image

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Rasterize( vectorimg, w, h, opts )

Parameters

vectorimg

-

string or ByteArray; the vector image to be rasterized

w

-

: nonnegint

h

-

: (optional) nonnegint

opts

-

(optional) one or more options as specified below

Options

• 

source : one of file or string

  

Specifies whether the input is file or a literal string. The default is file.

Description

• 

The Rasterize(vectorimg,w,h,opts) command generates a raster image with width w and height h from the vector graphics image vectorimg as an Image.

Examples

Read a file and rasterize an SVG file to an Image.

svg<svg width='400' height='400' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><circle cx='200' cy='200' r='100' fill='orange' /></svg>

svg<svg width='400' height='400' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><circle cx='200' cy='200' r='100' fill='orange' /></svg>

(1)

ImageTools:-Rasterizesvg&comma;600&comma;source=string

Compatibility

• 

The ImageTools[Rasterize] command was introduced in Maple 2025.

• 

For more information on Maple 2025 changes, see Updates in Maple 2025.

See Also

ImageTools

StringTools[ToByteArray]

 


Download Help Document