ImageTools
Rasterize
rasterize vector graphics to image
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
Rasterize( vectorimg, w, h, opts )
vectorimg
-
string or ByteArray; the vector image to be rasterized
w
: nonnegint
h
: (optional) nonnegint
opts
(optional) one or more options as specified below
source : one of file or string
Specifies whether the input is file or a literal string. The default is file.
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.
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>
ImageTools:-Rasterizesvg,600,source=string
The ImageTools[Rasterize] command was introduced in Maple 2025.
For more information on Maple 2025 changes, see Updates in Maple 2025.
See Also
StringTools[ToByteArray]
Download Help Document