12 int scansz; /* scanline size in bytes */
13 int pitch; /* bytes from one scanline to the next */
15 struct cmapent cmap[256];
16 unsigned char *pixels;
19 int alloc_image(struct image *img, int x, int y, int bpp);
20 int load_image(struct image *img, const char *fname);
21 int save_image(struct image *img, const char *fname);
23 int cmp_image(struct image *a, struct image *b);
25 void blit(struct image *src, int sx, int sy, int w, int h, struct image *dst, int dx, int dy);
26 void overlay_key(struct image *src, unsigned int key, struct image *dst);
28 unsigned int get_pixel(struct image *img, int x, int y);
29 unsigned int get_pixel_rgb(struct image *img, int x, int y, unsigned int *rgb);
30 void put_pixel(struct image *img, int x, int y, unsigned int pix);
32 void quantize_image(struct image *img, int maxcol);
33 int gen_shade_lut(struct image *img, int levels, int maxcol, struct cmapent *shade_cmap,