3. Functions

In order to use libmtpixel functions in your C program you must use this:

#include <libmtpixel.h>

3.1 Initializing and Quitting

void mtpaint_init();

Initialize the libmtpixel library.

int mtpaint_new_image(int w, int h, int pal_cols, int pal_type, int bpp);

Create a new pixel canvas. Returns 0 on success, failure otherwise.

void mtpaint_quit();

Quit the libmtpixel library.

3.2 Painting

3.3 The Palette

3.4 Image Manipulation

3.5 The Clipboard

3.6 File Handling