Pixels then proceed from left to right, then downward, throughout the array. 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. Each color component is represented by an integer between 0 and 255. The data property returns a Uint8ClampedArray which 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 that is, "RGBA" format). It contains the following read-only attributes: widthĪ Uint8ClampedArray representing a one-dimensional array containing the data in the RGBA order, with integer values between 0 and 255 (included). The ImageData object represents the underlying pixel data of an area of a canvas object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |