Function picturegetrgb
#include <macaw.h>void picturegetrgb(int p, int x, int y, int *r, int *g, int *b);
Reads a pixel's true colour as red, green and blue. That's what shows when the screen is in thousands of colours.
Parameters
pint- The picture's number.
xint- How far the pixel is from the picture's left edge, in pixels.
yint- How far the pixel is from the picture's top, in pixels.
rint *- Where to put the red, from 0 to 255: pass the address of an
int, like&r, orNULL. gint *- Where to put the green, from 0 to 255: pass the address of an
int, like&g, orNULL. bint *- Where to put the blue, from 0 to 255: pass the address of an
int, like&b, orNULL.
In Pictures, with newpicture, loadpicture, freepicture, picturewidth, pictureheight, drawpicture, drawpart, drawinto, drawpictureex, drawpartex, savepicture, parsepicture, decodepicture, decodepicturefile, importpicture, importpicturefile, pictureget, pictureset, picturesize, pictureclear, picturecopy, picturesetrgb.