Macaw OS C reference

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, or NULL.
gint *
Where to put the green, from 0 to 255: pass the address of an int, like &g, or NULL.
bint *
Where to put the blue, from 0 to 255: pass the address of an int, like &b, or NULL.

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.