-
Notifications
You must be signed in to change notification settings - Fork 0
/
bmp_header.h
54 lines (46 loc) · 1.02 KB
/
bmp_header.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma pack(1)
typedef struct {
unsigned char fileMarker1;
unsigned char fileMarker2;
unsigned int bfSize;
unsigned short unused1;
unsigned short unused2;
unsigned int imageDataOffset;
} bmp_fileheader;
typedef struct {
unsigned int biSize;
signed int w; // width
signed int h; // height
unsigned short planes;
unsigned short bitPix;
unsigned int biCompression;
unsigned int biSizeImage;
int biXPelsPerMeter;
int biYPelsPerMeter;
unsigned int biClrUsed;
unsigned int biClrImportant;
} bmp_infoheader;
#pragma pack()
typedef struct {
unsigned char red;
unsigned char green;
unsigned char blue;
} color;
typedef struct {
color **map;
int w;
int h;
} image;
typedef struct {
image pic;
bmp_fileheader fileh;
bmp_infoheader infoh;
} bmp_file;
typedef struct {
unsigned char l_w; // line_width
color draw_clr;
} set;
typedef struct {
unsigned int y;
unsigned int x;
} pt2D;