1 /* bmp.h -- bmp headers */
15 #define B_WRONG_MODE -2
18 #define B_NO_SUPPORT -5
21 #define B_E_READ_DATA -8
22 #define B_E_WRITE_DATA -9
23 #define MAX_CHARS_FILE 32
27 /* bmp specific variables */
28 typedef struct s_bmp_hdr {
29 unsigned short int identifier;
31 unsigned short int reserved1;
32 unsigned short int reserved2;
33 unsigned int offset; /* <- 14 + 40 bytes = 0x36 */
34 } t_bmp_hdr; /* 14 bytes */
36 typedef struct s_bmp_info {
37 unsigned int size; /* 40 bytes = 0x28 */
40 unsigned short int planes;
41 unsigned short int bpp;
42 unsigned int compression;
43 unsigned int imagesize;
48 } t_bmp_info; /* 40 bytes */
50 typedef struct s_pixel {
56 typedef struct s_bmp {
63 char file[MAX_CHARS_FILE];
70 /* function prototypes */
71 int bmp_init(t_bmp *bmp);
72 int bmp_shutdown(t_bmp *bmp);