JavaScript ImageData : Object
Contains the pixel data of a
CanvasRenderingContext2D. Can
also be created through CanvasRenderingContext2D.createImageData() or
CanvasRenderingContext2D.getImageData().
Constructors
Creates an ImageData of the specified size with the specified data. data[0] is the Red component of
the first pixel (top left), data[1] is the Green component of the first pixel, data[2]
is the Blue component of the first pixel, data[3] is the Alpha component of the first pixel,
data[4] is the Red component of the second pixel (one right of top left), etc.
Example:
RunResults:
Instance Properties
data : Uint8ClampedArray
The pixel color values. The data is stored in RGBA order so data[0] is pixel 0's red channel,
data[1] is pixel 0's green channel, data[2] is pixel 0's blue channel,
data[3] is pixel 0's alpha channel, data[4] is pixel 1's red channel, etc.
Example:
RunResults:
Copyright © PUBLIC Contributors