Help Center

Local Navigation

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.

CanvasPixelArray 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 or later

Previous topic: Object: CanvasPattern

Was this information helpful? Send us your comments.