EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

data property

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

HTML Canvas 2D Context, Section 13Internet Explorer 9

Syntax

JavaScript

pixelArray = object.data

Property values

Type: number

The CanvasPixelArray object that contains the image data.

Standards information

Remarks

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 data property, see Sampling image colors with Canvas.

See also

CanvasImageData
getImageData

 

 

표시:
© 2014 Microsoft