Skip to content

Variable: ImageData ​

ts
ImageData: {
  (width, height): ImageData;
  (data, width, height?): ImageData;
  prototype: ImageData;
};

Defined in: types/desktop-engine.d.ts:4929

Pixel data (API 5): new ImageData(width, height) is transparent black; new ImageData(data, width, height?) is around a Uint8ClampedArray of width * height * 4 bytes, which is its data. A size of 0 throws an IndexSizeError

Type Declaration ​

Call Signature ​

ts
new ImageData(width, height): ImageData;

Parameters ​

ParameterType
widthnumber
heightnumber

Returns ​

ImageData

Call Signature ​

ts
new ImageData(
   data, 
   width, 
   height?
): ImageData;

Parameters ​

ParameterType
dataUint8ClampedArray
widthnumber
height?number

Returns ​

ImageData

NameTypeDefined in
prototypeImageDatatypes/desktop-engine.d.ts:4930

The SDK is released under the Apache License 2.0