CanvasPixelArray

Availability

BlackBerry Device Software 6.0 or later

The CanvasPixelArray object can be accessed to look at the raw pixel data; each pixel is represented by four one-byte values (red, green, blue, and alpha, in that order). Each color component is represented by an integer between 0 and 255. Each component is assigned a consecutive index within the array, with the top left pixel's red component being at index 0 within the array. Pixels then proceed from left to right, then downward, throughout the array.

Properties

Property name

Type

Description

Status

Support level

Availability

length

int

Returns the number of pixels in the canvas.

read only

HTML 5

6.0+

Last modified: 2014-03-10



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus