ImageData
Defined in: api/node/typescript/index.ts:169 ↗
An image data type that can be displayed by the Image element.
This interface is inspired by the web ImageData ↗ interface.
Use ImageData.loadFromPath or ImageData.loadFromData to load an image file,
or pass an object with the width, height, and RGBA data of the pixels.
Pass undefined for an empty image.
app.icon = slint.ImageData.loadFromPath("icons/app.svg");app.preview = { width: 1, height: 1, data: new Uint8Array([255, 0, 0, 255]) };Properties
Section titled “Properties”
readonlyoptionalpath?:string
Defined in: api/node/typescript/index.ts:174 ↗
Returns the path of the image, if it was loaded from disk. Otherwise the property is undefined.
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get data():
Uint8Array
Defined in: api/node/typescript/index.ts:179 ↗
Returns the image as buffer.
Returns
Section titled “Returns”Uint8Array
height
Section titled “height”Get Signature
Section titled “Get Signature”get height():
number
Defined in: api/node/typescript/index.ts:189 ↗
Returns the height of the image in pixels.
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get width():
number
Defined in: api/node/typescript/index.ts:184 ↗
Returns the width of the image in pixels.
Returns
Section titled “Returns”number
© 2026 SixtyFPS GmbH