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.
Properties
Section titled “Properties”Size of the image in pixels.
size: SizeRead-only.
Methods
Section titled “Methods”
fromData(data)
Section titled “fromData(data)”Creates an image from raw data.
static fromData(data: Data): ImageLoads an image from the raw data. If the image could not be read, the function will return null.
Parameters
Section titled “Parameters”data Data
Data to read image from.
Return value
Section titled “Return value”Image
The read image or null if the image could not be read.
fromFile(filePath)
Section titled “fromFile(filePath)”Creates an image from file.
static fromFile(filePath: string): ImageLoads an image from the specified file path. If the image could not be read, the function will return null.
Parameters
Section titled “Parameters”filePath string
File path to read image from.
Return value
Section titled “Return value”Image
The read image or null if the image could not be read.