Macaw OS C reference

Function loadpicture

#include <macaw.h>
int loadpicture(const char *path);

Loads a picture from a file: a .pxl saved by Paint, or a .png.

Parameters

pathconst char *
The file's path, from your program's folder unless it starts with /.

Returns int

The picture's number, or 0 if the file couldn't be read.

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