🌆
Retrieves a subsection of an image or canvas as a new Q5 Image
or the color of a pixel in the image or canvas.
If only x and y are specified, this function returns the color of the pixel
at the given coordinate in [R, G, B, A] array format. If loadPixels
has never been run, it's run by this function.
If you make changes to the canvas or image, you must call loadPixels
before using this function to get current color data.
🌆 Retrieves a subsection of an image or canvas as a new Q5 Image or the color of a pixel in the image or canvas.
If only x and y are specified, this function returns the color of the pixel at the given coordinate in
[R, G, B, A]array format. IfloadPixelshas never been run, it's run by this function.If you make changes to the canvas or image, you must call
loadPixelsbefore using this function to get current color data.Not applicable to WebGPU canvases.