Skip to content

ImageData

ImageData: object

Defined in: api/node/typescript/index.ts:169 ↗

Use these functions to load an ImageData from an image file. The supported formats are SVG, PNG, and JPEG.

loadFromData(data, format?): ImageData

Decodes the image from data, the content of an image file.

format is the lowercase file extension of the data, such as "png" or "svg". Without it, the format is guessed from the data. Only SVG data that starts with <?xml or <svg is recognized.

Uint8Array

string

ImageData

if the data can’t be decoded.

loadFromPath(path): ImageData

Loads the image from the file at path.

string

ImageData

if the file can’t be read or decoded.


© 2026 SixtyFPS GmbH