1 /* bmp.h -- bmp headers */
15 #define B_NO_READ_MODE -2
18 #define B_NO_SUPPORT -5
21 #define B_E_READ_DATA -8;
22 #define MAX_CHARS_FILE 32
26 /* bmp specific variables */
27 typedef struct s_bmp_hdr {
28 unsigned short int identifier;
30 unsigned short int reserved1;
31 unsigned short int reserved2;
32 unsigned int offset; /* <- 14 + 40 bytes = 0x36 */
33 } t_bmp_hdr; /* 14 bytes */
35 typedef struct s_bmp_info {
36 unsigned int size; /* 40 bytes = 0x28 */
39 unsigned short int planes;
40 unsigned short int bpp;
41 unsigned int compression;
42 unsigned int imagesize;
47 } t_bmp_info; /* 40 bytes */
49 typedef struct s_pixel {
55 typedef struct s_bmp {
62 char file[MAX_CHARS_FILE];
69 /* function prototypes */
70 int bmp_init(t_bmp *bmp);
71 int bmp_shutdown(t_bmp *bmp);