JavaScripture
Contribute via GitHub Feedback

JavaScript ImageData : Object

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:

Run

Results:

 

height : Number  

The height of the buffer in pixels.

Example:

Run

Results:

 

width : Number  

The width of the buffer in pixels.

Example:

Run

Results: