Interface ImageData

An image data type that can be displayed by the Image element.

This interface is inspired by the web ImageData interface.

interface ImageData {
    path?: string;
    get data(): Uint8Array;
    get height(): number;
    get width(): number;
}

Properties

Accessors

Properties

path?: string

Returns the path of the image, if it was loaded from disk. Otherwise the property is undefined.

Accessors

  • get data(): Uint8Array
  • Returns the image as buffer.

    Returns Uint8Array

  • get height(): number
  • Returns the height of the image in pixels.

    Returns number

  • get width(): number
  • Returns the width of the image in pixels.

    Returns number