cdCanvasGetImageRGB

Definition: include pGUI.e

sequence {r,g,b} = cdCanvasGetImageRGB(cdCanvas hCdCanvas, atom x, y, w, h)
-- or --
sequence {r,g,b} = wdCanvasGetImageRGB(cdCanvas hCdCanvas, atom x, y, w, h)
Description: Returns the red, green and blue components of each pixel in a server image.
The RGB components are provided in three matrices stored as byte arrays.
The (i,j) component of these matrices is at the address (j*w+i).
As occurs with all primitives from the Canvas Draw library, the pixel (0,0) is at the bottom left corner, and the pixel (w-1,h-1) is that the upper right corner of the image rectangle.