exportImage

Exports a group of drawing elements as an image.

The group will be positioned at [0, 0] in the exported image. Its dimensions will be used as the default dimensions for the image.

Scene images have to be of same origin or CORS-enabled.

The export operation is asynchronous and returns a promise. The promise will be resolved with a PNG image encoded as a Data URI.

Example
View Source
Change Theme:

Parameters

group Group

The root group containing all elements to export.

options? ImageExportOptions

The export options.

Returns

Promise<string> A promise that will be resolved with a PNG image encoded as a Data URI.

In this article

Not finding the help you need?