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.
Type Declaration
Section titled “Type Declaration”loadFromData()
Section titled “loadFromData()”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.
Parameters
Section titled “Parameters”Uint8Array
format?
Section titled “format?”string
Returns
Section titled “Returns”Throws
Section titled “Throws”if the data can’t be decoded.
loadFromPath()
Section titled “loadFromPath()”loadFromPath(
path):ImageData
Loads the image from the file at path.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Throws
Section titled “Throws”if the file can’t be read or decoded.
© 2026 SixtyFPS GmbH