Skip to content

toDataURL

toDataURL(canvasEl, format, quality): string

Defined in: src/util/misc/dom.ts:53

since 2.6.0 moved from canvas instance to utility. possibly useless

Parameters

canvasEl

HTMLCanvasElement

to copy size and content of

format

ImageFormat

‘jpeg’ or ‘png’, in some browsers ‘webp’ is ok too

quality

number

<= 1 and > 0

Returns

string

data url