int width, height;
int bpp;
int nchan;
- int scansz, pitch;
+ int scansz; /* scanline size in bytes */
+ int pitch; /* bytes from one scanline to the next */
int cmap_ncolors;
struct cmapent cmap[256];
unsigned char *pixels;
void blit(struct image *src, int sx, int sy, int w, int h, struct image *dst, int dx, int dy);
void overlay_key(struct image *src, unsigned int key, struct image *dst);
+unsigned int get_pixel(struct image *img, int x, int y);
+unsigned int get_pixel_rgb(struct image *img, int x, int y, unsigned int *rgb);
+void put_pixel(struct image *img, int x, int y, unsigned int pix);
+
+void quantize_image(struct image *img, int maxcol);
+int gen_shade_lut(struct image *img, int levels, int maxcol, struct cmapent *shade_cmap,
+ int *shade_lut);
+
#endif /* IMAGE_H_ */