Background colour for the image. This can be a Color instance or a CSS color string, such as "#fff"
. Default is "transparent"
.
Form in which the image data will be stored:
"url"
: The image will be stored as a string whose value is a data URL for the image. This is the default."string"
: The image will be stored as a raw string representation. This is only applicable for SVG images. Other image types will be treated as "url"
."blob"
: The image will be stored in a Blob object.This option has no effect on downloadImage.
Default colour for math content in the image. This can be a Color instance or a CSS color string, such as "#fff"
. Default is "black"
.
Image file format such as "png"
or "svg"
. Default is "png"
. Other formats may be supported depending on the browser, such as "jpeg"
or "avif"
. If the requested format is not available, a PNG image is produced.
Size of the margin added around the outside of the image, in pixels. (For format "svg"
, the relative size of the margin will be comparable to a bitmap image with the same margin, but the absolute size of the margin will scale along with the rest of the image.) Default is 0
.
If true, the image may be rendered at a higher than requested resolution and then scaled down to the requested size. This may improve image quality. Default is true
.
Quality of lossy formats such as "jpeg"
, between 0
and 1
. Default is 0.92
.
Scaling factor applied to the default image size. Ignored by format "svg"
. Default is 1
.
This API is still under development and is subject to change. Copyright © Math I Can Do Solutions Incorporated and/or its licensors.
Options that affect image conversion with Editor.toImage and Editor.downloadImage.
Example: List image formats supported in this browser
supportedImageFormats