11struct bitmap *bitmap_create(
int w,
int h);
12void bitmap_delete(
struct bitmap *b);
14int bitmap_get(
struct bitmap *b,
int x,
int y);
15void bitmap_set(
struct bitmap *b,
int x,
int y,
int value);
16int bitmap_width(
struct bitmap *b);
17int bitmap_height(
struct bitmap *b);
18void bitmap_reset(
struct bitmap *b,
int value);
19int *bitmap_data(
struct bitmap *b);
21void bitmap_rotate_clockwise(
struct bitmap *s,
struct bitmap *t);
22void bitmap_rotate_counterclockwise(
struct bitmap *s,
struct bitmap *t);
24int bitmap_average(
struct bitmap *s);
25void bitmap_smooth(
struct bitmap *s,
struct bitmap *t,
int msize);
26void bitmap_subset(
struct bitmap *s,
int x,
int y,
struct bitmap *t);
27void bitmap_convolve(
struct bitmap *s,
struct bitmap *t,
int (*f) (
int x));
28void bitmap_copy(
struct bitmap *s,
struct bitmap *t);
30struct bitmap *bitmap_load_any(
const char *path);
32struct bitmap *bitmap_load_raw(
const char *file);
33struct bitmap *bitmap_load_bmp(
const char *file);
34struct bitmap *bitmap_load_pcx(
const char *file);
35struct bitmap *bitmap_load_sgi_rgb(
const char *file);
36struct bitmap *bitmap_load_jpeg(
const char *file);
38int bitmap_save_raw(
struct bitmap *b,
const char *file);
39int bitmap_save_bmp(
struct bitmap *b,
const char *file);
40int bitmap_save_jpeg(
struct bitmap *b,
const char *file);
44#define MAKE_RGBA(r,g,b,a) ( (((int)(a))<<24) | (((int)(r))<<16) | (((int)(g))<<8) | (((int)(b))<<0) )
49#define GET_RED(rgba) (( (rgba)>>16 ) & 0xff )
54#define GET_GREEN(rgba) (( (rgba)>>8 ) & 0xff )
59#define GET_BLUE(rgba) (( (rgba)>>0 ) & 0xff )
64#define GET_ALPHA(rgba) (( (rgba)>>24 ) & 0xff)