Public function

Signature
function getSvgAsImage(
  svg: SVGElement,
  isSafari: boolean,
  options: {
    type: 'jpeg' | 'png' | 'webp'
    quality: number
    scale: number
  }
): Promise<Blob | null>
Parameters
NameDescription

svg

SVGElement

isSafari

boolean

options

{
  type: 'jpeg' | 'png' | 'webp'
  quality: number
  scale: number
}
Returns
Promise<Blob | null>
Source

packages/tldraw/src/lib/utils/export/export.ts

getEmbedInfoHandTool