Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ImageData

The underlying pixel data of an area of a element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData().

interface ImageData {
readonly colorSpace: PredefinedColorSpace;
readonly data: Uint8ClampedArray;
readonly height: number;
readonly width: number;
}
var ImageData: {
prototype: ImageData;
new (
sw: number,
sh: number,
settings?: ImageDataSettings,
): ImageData;
new (
data: Uint8ClampedArray,
sw: number,
sh?: number,
settings?: ImageDataSettings,
): ImageData;
}
;

§Properties

§
readonly colorSpace: PredefinedColorSpace
[src]
§
readonly data: Uint8ClampedArray
[src]

Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255.

§
readonly height: number
[src]

Returns the actual dimensions of the data in the ImageData object, in pixels.

§
readonly width: number
[src]

Returns the actual dimensions of the data in the ImageData object, in pixels.