image.h (454B)
1 struct Image 2 { 3 v2u dim; 4 u8 *data; 5 }; 6 7 #pragma pack(push, 1) 8 struct ImgTgaHeader 9 { 10 // http://paulbourke.net/dataformats/tga/ 11 u8 id_length; 12 u8 color_map_type; 13 u8 data_type_code; 14 u16 color_map_origin; 15 u16 color_map_length; 16 u8 color_map_depth; 17 u16 x_origin; 18 u16 y_origin; 19 u16 width; 20 u16 height; 21 u8 bits_per_pixel; 22 u8 image_descriptor; 23 }; 24 #pragma pack(pop) 25 static_assert(sizeof(struct ImgTgaHeader) == 18, "");