Daisuke Nojiri | 09ad206 | 2015-08-03 10:51:38 -0700 | [diff] [blame^] | 1 | #ifndef __BITMAP_H__ |
| 2 | #define __BITMAP_H__ |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | |
| 6 | struct bitmap_file_header { |
| 7 | uint8_t signature[2]; |
| 8 | uint32_t file_size; |
| 9 | uint16_t reserved[2]; |
| 10 | uint32_t bitmap_offset; |
| 11 | } __attribute__ ((__packed__)); |
| 12 | |
| 13 | /* Bitmap version 3 */ |
| 14 | |
| 15 | struct bitmap_header_v3 { |
| 16 | uint32_t header_size; |
| 17 | int32_t width; |
| 18 | int32_t height; |
| 19 | uint16_t planes; |
| 20 | uint16_t bits_per_pixel; |
| 21 | uint32_t compression; |
| 22 | uint32_t size; |
| 23 | int32_t h_res; |
| 24 | int32_t v_res; |
| 25 | uint32_t colors_used; |
| 26 | uint32_t colors_important; |
| 27 | } __attribute__ ((__packed__)); |
| 28 | |
| 29 | struct bitmap_palette_element_v3 { |
| 30 | uint8_t blue; |
| 31 | uint8_t green; |
| 32 | uint8_t red; |
| 33 | uint8_t reserved; |
| 34 | } __attribute__ ((__packed__)); |
| 35 | |
| 36 | #endif /* __BITMAP_H__ */ |