11 struct bitmap *bitmap_create(
int w,
int h);
12 void bitmap_delete(
struct bitmap *b);
14 int bitmap_get(
struct bitmap *b,
int x,
int y);
15 void bitmap_set(
struct bitmap *b,
int x,
int y,
int value);
16 int bitmap_width(
struct bitmap *b);
17 int bitmap_height(
struct bitmap *b);
18 void bitmap_reset(
struct bitmap *b,
int value);
19 int *bitmap_data(
struct bitmap *b);
21 void bitmap_rotate_clockwise(
struct bitmap *s,
struct bitmap *t);
22 void bitmap_rotate_counterclockwise(
struct bitmap *s,
struct bitmap *t);
24 int bitmap_average(
struct bitmap *s);
25 void bitmap_smooth(
struct bitmap *s,
struct bitmap *t,
int msize);
26 void bitmap_subset(
struct bitmap *s,
int x,
int y,
struct bitmap *t);
27 void bitmap_convolve(
struct bitmap *s,
struct bitmap *t,
int (*f) (
int x));
28 void bitmap_copy(
struct bitmap *s,
struct bitmap *t);
30 struct bitmap *bitmap_load_any(
const char *path);
32 struct bitmap *bitmap_load_raw(
const char *file);
33 struct bitmap *bitmap_load_bmp(
const char *file);
34 struct bitmap *bitmap_load_pcx(
const char *file);
35 struct bitmap *bitmap_load_sgi_rgb(
const char *file);
36 struct bitmap *bitmap_load_jpeg(
const char *file);
38 int bitmap_save_raw(
struct bitmap *b,
const char *file);
39 int bitmap_save_bmp(
struct bitmap *b,
const char *file);
40 int 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)