1 #ifndef _IMAGES_IMAGES_H
2 #define _IMAGES_IMAGES_H
5 IMAGE_GRAYSCALE = 0x1, /* grayscale image */
9 uns flags; /* enum image_flag */
10 uns width; /* number of columns */
11 uns height; /* number of rows */
12 uns size; /* buffer size in bytes */
13 byte *pixels; /* RGB */
19 IMAGE_FORMAT_UNDEFINED = 0,
28 enum image_format format;
29 struct image_data image;
41 void image_open(struct image_io *io, struct fastbuf *fb, struct mempool *pool);
42 void image_close(struct image_io *io);
43 int image_read_header(struct image_io *io);
44 int image_read_data(struct image_io *io);
45 int image_read(struct image_io *io);
46 int image_write(struct image_io *io);