Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

data property

Gets the CanvasPixelArray object that contains image data for a given CanvasImageData object.

HTML Canvas 2D Context, Section 13Internet Explorer 9


HRESULT value = object.get_data(number* pixelArray);

Property values

Type: number

The CanvasPixelArray object that contains the image data.

Standards information


An image is organized by pixels with four values per pixel: red, green, blue, and alpha. To access a specific pixel, use the formula ((canvas.width * y)+ x) *4, where x and y are the row and offset in the image.

For a demo that uses the ICanvasImageData::data property, see Sampling image colors with Canvas.

See also




Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.