The ImageData interface represents image data, which contains the image bytes, width, height, stride, pixel format, orientation and a tag.

`Please release the imageData object when it is no longer needed. see` ImageData.release.

If you want to display imagedata on react UI Element, you can use imageDataToBase64

interface ImageData {
    buffer: ArrayBuffer;
    format: number;
    height: number;
    orientation: number;
    stride: number;
    width: number;
    release(): void;
}

Properties

buffer: ArrayBuffer

The raw bytes of the image, of type ArrayBuffer.

format: number

The pixel format of the image, of type EnumPixelFormat

height: number

The height of the image in pixels.

orientation: number

The orientation information of the image.

stride: number

The stride (or row width) of the image in bytes.

width: number

The width of the image in pixels.

Methods

  • Release the native memory. Data cannot be used after release.

    Returns void