Skip to main content

DrawDecodeImageBitmap

Callable

  • DrawDecodeImageBitmap(blob): Promise<ImageBitmap>

  • Decode image bytes into an ImageBitmap.

    createImageBitmap cannot decode SVG, and mods pass SVG icons in as data: URLs. Those are drawn to a canvas first, at the SVG's own pixel size, and the canvas is what becomes the bitmap.


    Parameters

    • blob: Blob

    Returns Promise<ImageBitmap>