Extract a pixel array from a loaded image. Draws the image
into a canvas so it can read the pixels back.
Name | Type | Description |
---|---|---|
image |
Image | The image to extract pixels from. |
width |
Number | The width of the image. If not defined, then image.width is assigned. |
height |
Number | The height of the image. If not defined, then image.height is assigned. |
Returns:
The pixels of the image.