getImageDataUrl

Get a screenshot of the canvas of rendered image.

Details

The function returns a data URL type representation (same as using canvas.toDataUrl() function) of the rendered image.

Parameters

cb

Callback function to be called with the data URL.

type

The image format. Default = image/png.

encoderOptions

A Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp. Default = 0.92

Return value

No return value, but calls the callback function with the data URL