Go to the source code of this file.
Data Structures | |
struct | MrPNMImage |
Defines | |
#define | MR_PBM_ASCII 1 |
#define | MR_PGM_ASCII 2 |
#define | MR_PPM_ASCII 3 |
#define | MR_PBM_RAW 4 |
#define | MR_PGM_RAW 5 |
#define | MR_PPM_RAW 6 |
#define | MR_PNM_ELIBC 0 |
#define | MR_PNM_EMAGIC 1 |
#define | MR_PNM_EITEMS 2 |
#define | MR_PNM_EDATA 3 |
#define | MR_PNM_ESIZE 4 |
#define | MR_PNM_EMAXVAL 5 |
Typedefs | |
typedef MrPNMImage | MrPNMImage |
Functions | |
MrPNMImage * | mr_pnm_new () |
void | mr_pnm_free (MrPNMImage *img) |
MrPNMImage * | mr_pnm_new_from_file (const char *filename) |
int | mr_pnm_write_to_file (MrPNMImage *image, const char *filename) |
void | mr_pnm_draw_rectangle (MrPNMImage *image, unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned char r, unsigned char g, unsigned char b, short int fill) |
Draw a rectangle on a PNM image. | |
void | mr_pnm_draw_horizontal_line (MrPNMImage *image, unsigned int x, unsigned int y, unsigned int len, unsigned char r, unsigned char g, unsigned char b) |
Draw a horizontal line on a PNM image. | |
Variables | |
int | mr_pnm_errno |
|
Map magic number to PNM type |
|
|
|
|
|
|
|
data format |
|
width/height/maxval format |
|
error from a libc function call : see errno |
|
magic number |
|
max color value |
|
image/file size |
|
|
|
|
|
|
|
Draw a horizontal line on a PNM image.
|
|
Draw a rectangle on a PNM image.
|
|
Destroy a pnm image structure. !!! also destroy the pixels data !!! !!! you can call it with NULL parameter !!! |
|
Create a pnm image structure with fields sets to 0. |
|
Get a PNM type image from the specified file. Returns: The PNM image structure or NULL in case of errors. |
|
Write a PNM image to a file. Returns: 0 if successfull -1 in case of errors. |
|
Integer to indicates what went wrong (i.e. errno). Its value is significant only when the call returned an error (usually -1). |