]> mj.ucw.cz Git - libucw.git/blob - images/images.h
711210bb2e8bfbc24270aff90a83f4f2887b8ffa
[libucw.git] / images / images.h
1 #ifndef _IMAGES_IMAGES_H
2 #define _IMAGES_IMAGES_H
3
4 enum image_flag {
5   IMAGE_GRAYSCALE = 0x1,        /* grayscale image */
6   IMAGE_ALPHA = 0x2,            /* alpha present */
7 };
8
9 struct pixel {
10   byte r, g, b, a;
11 } PACKED;
12
13 struct image {
14   uns flags;                    /* enum image_flag */
15   uns width;                    /* number of columns */
16   uns height;                   /* number of rows */
17   struct pixel *pixels;         /* RGBA */
18 };
19
20 #endif
21