Skip to content

Image

Manages image data.

Images objects contains image data. APIs in Scriptable that work with images, either by taking an image as input or returning an image, will use this the Image type.

size

Size of the image in pixels.

size: Size

+fromFile

Creates image from file.

Loads an image from the specified file path. If the image could not be read, the function will return null.

static fromFile(filePath: string): Image

+fromData

Creates image from raw data.

Loads an image from the raw data. If the image could not be read, the function will return null.

static fromData(data: Data): Image