Macaw OS C reference

Function pictureget

#include <macaw.h>
int pictureget(int p, int x, int y);

Reads the colour of one pixel of a picture.

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.

Returns int

The pixel's colour, from 0 to 255, or 0 if it's outside the picture.

In Pictures, with newpicture, loadpicture, freepicture, picturewidth, pictureheight, drawpicture, drawpart, drawinto, drawpictureex, drawpartex, savepicture, parsepicture, decodepicture, decodepicturefile, importpicture, importpicturefile, pictureset, picturesize, pictureclear, picturecopy, picturegetrgb, picturesetrgb.