Skip to content
This is the alpha v4 version website. Looking for the v3 documentation?

toBlob

toBlob(sigma, opts?): Promise<Blob>

Defined in: packages/export-image/src/toImage.ts:10

This function takes a Sigma instance, draws the stage canvas using drawOnCanvas, and returns a promise that resolves to a blob of the expected image. Accepted formats are “image/png” and “image/jpeg”.

Parameters

sigma

Sigma

opts?

Partial<ToImageOptions> = {}

Returns

Promise<Blob>