|
Defines |
#define | PNM_MIN_MAGIC '1' |
#define | PNM_MAX_MAGIC '6' |
#define | PNM_ONE_BYTE_DEPTH 256 |
#define | PNM_MAX_COLOR_VALUE 65536 |
#define | PNM_MAX_LINE_WIDTH 70 |
#define | PNM_COLOR_SIZE 3 |
#define | PNM_MONO_SIZE 1 |
#define | ONE_BYTE 8 |
#define | PBM_BLACK 1 |
#define | PBM_WHITE 0 |
#define | PNM_GET_NITEMS(pnmtype) (pnmtype == MR_PBM_RAW || pnmtype == MR_PBM_ASCII ? 2 : 3) |
#define | PNM_IS_COLOR(pnmtype) (pnmtype == MR_PPM_ASCII || pnmtype == MR_PPM_RAW) |
#define | PNM_IS_ASCII(pnmtype) (pnmtype < MR_PBM_RAW) |
#define | PNM_IS_DEPTH1(maxval) (maxval < PNM_ONE_BYTE_DEPTH) |
#define | PNM_IS_DEPTH2(maxval) (maxval >= PNM_ONE_BYTE_DEPTH) |
#define | BIT8 0x01 |
#define | BIT7 0x02 |
#define | BIT6 0x04 |
#define | BIT5 0x08 |
#define | BIT4 0x10 |
#define | BIT3 0x20 |
#define | BIT2 0x40 |
#define | BIT1 0x80 |
#define | IS_BIT_ON(octet, b) ((octet) & b) |
#define | SET_BIT_ON(octet, b) ((octet) | b) |
#define | SET_BIT_OFF(octet, b) ((octet) & b) |
Functions |
static int | pnm_alloc_data (MrPNMImage *image) |
static void | pbm_expand_n_bits (unsigned char *dst, unsigned short int *src, unsigned int n) |
static void | pbm_group_n_bytes (unsigned char *dst, unsigned short int *src, unsigned int n) |
static int | pnm_magic_number_fread (FILE *f, MrPNMImage *image) |
static int | pnm_magic_number_fwrite (FILE *f, MrPNMImage *image) |
static int | pnm_items_fread (FILE *f, MrPNMImage *image) |
static int | pnm_items_fwrite (FILE *f, MrPNMImage *image) |
static int | pnm_ascii_one_line_fread (FILE *f, MrPNMImage *image, unsigned char *p) |
static int | pnm_ascii_one_line_fwrite (FILE *f, MrPNMImage *image, unsigned char *p) |
static int | pnm_data_fread (FILE *f, MrPNMImage *image) |
static int | pnm_data_fwrite (FILE *f, MrPNMImage *image) |
static int | pnm_fread (FILE *f, MrPNMImage *image) |
static int | pnm_fwrite (FILE *f, MrPNMImage *image, const char *sign) |
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_horizontal_line (MrPNMImage *pnm_img, 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.
|
void | mr_pnm_draw_rectangle (MrPNMImage *pnm_img, 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.
|
Variables |
int | mr_pnm_errno = MR_PNM_ELIBC |