Function: renderToPng()
ts
function renderToPng(layout, options?): Promise<Blob>;Render a layout to a PNG (or JPEG / WebP with type) image, in the browser or a worker. Images must load (and, from other sites, allow cross-origin use) or their cells show their fill. Elsewhere, use drawLayout with your own canvas.
Parameters
| Parameter | Type |
|---|---|
layout | Layout |
options | RasterOptions & object |
Returns
Promise<Blob>