CanvasPixelArray

Note: The latest HTML specification has removed CanvasPixelArray in favor of the JavaScript Uint8ClampedArray typed array. However, as of April 2012, most browsers still returns CanvasPixelArray and there are very few implementations which return Uint8ClampedArray on ImageData.data.

Returned by ImageData's data attribute.

The CanvasPixelArray object indicates the color components of each pixel of an image, first for each of its three RGB values in order (0-255) and then its alpha component (0-255), proceeding from left-to-right, for each row (rows are top to bottom).

  readonly attribute unsigned long length
  getter octet (in unsigned long index);
  setter void (in unsigned long index, in octet value);

Specification

Document Tags and Contributors

Contributors to this page: Sheppy, kscarfone, satyr, Brettz9, oldrin, teoli, myakura
Last updated by: teoli,