14 int scansz; /* scanline size in bytes */
15 int pitch; /* bytes from one scanline to the next */
17 struct cmapent cmap[256];
18 unsigned char *pixels;
21 int alloc_image(struct image *img, int x, int y, int bpp);
22 int load_image(struct image *img, const char *fname);
23 int save_image(struct image *img, const char *fname);
24 int save_image_file(struct image *img, FILE *fp);
26 int cmp_image(struct image *a, struct image *b);
28 void blit(struct image *src, int sx, int sy, int w, int h, struct image *dst, int dx, int dy);
29 void overlay_key(struct image *src, unsigned int key, struct image *dst);
31 unsigned int get_pixel(struct image *img, int x, int y);
32 unsigned int get_pixel_rgb(struct image *img, int x, int y, unsigned int *rgb);
33 void put_pixel(struct image *img, int x, int y, unsigned int pix);
35 int quantize_image(struct image *img, int maxcol);
36 int gen_shades(struct image *img, int levels, int maxcol, int *shade_lut);