blob: 4799b5e4d350bbf79e5f859326df3612feee8ed0 (
plain) (
blame)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/*
** bmphed.h - .bmp file header macros
**
** Public domain by MIYASAKA Masaru (July 13, 2004)
*/
#ifndef BMPHED_H
#define BMPHED_H
/* BMP file signature */
#define BMP_SIGNATURE 0x4D42
#define BMP_SIG_BYTES 2
/* BITMAPFILEHEADER */
#define BFH_WTYPE 0 /* WORD bfType; */
#define BFH_DSIZE 2 /* DWORD bfSize; */
#define BFH_WRESERVED1 6 /* WORD bfReserved1; */
#define BFH_WRESERVED2 8 /* WORD bfReserved2; */
#define BFH_DOFFBITS 10 /* DWORD bfOffBits; */
#define BFH_DBIHSIZE 14 /* DWORD biSize; */
#define FILEHED_SIZE 14 /* sizeof(BITMAPFILEHEADER) */
#define BIHSIZE_SIZE 4 /* sizeof(biSize) */
/* BITMAPINFOHEADER, BITMAPV4HEADER, BITMAPV5HEADER */
#define BIH_DSIZE 0 /* DWORD biSize; */
#define BIH_LWIDTH 4 /* LONG biWidth; */
#define BIH_LHEIGHT 8 /* LONG biHeight; */
#define BIH_WPLANES 12 /* WORD biPlanes; */
#define BIH_WBITCOUNT 14 /* WORD biBitCount; */
#define BIH_DCOMPRESSION 16 /* DWORD biCompression; */
#define BIH_DSIZEIMAGE 20 /* DWORD biSizeImage; */
#define BIH_LXPELSPERMETER 24 /* LONG biXPelsPerMeter; */
#define BIH_LYPELSPERMETER 28 /* LONG biYPelsPerMeter; */
#define BIH_DCLRUSED 32 /* DWORD biClrUsed; */
#define BIH_DCLRIMPORANT 36 /* DWORD biClrImportant; */
#define B4H_DREDMASK 40 /* DWORD bV4RedMask; */
#define B4H_DGREENMASK 44 /* DWORD bV4GreenMask; */
#define B4H_DBLUEMASK 48 /* DWORD bV4BlueMask; */
#define B4H_DALPHAMASK 52 /* DWORD bV4AlphaMask; */
#define B4H_DCSTYPE 56 /* DWORD bV4CSType; */
#define B4H_XENDPOINTS 60 /* CIEXYZTRIPLE bV4Endpoints; */
#define B4H_DGAMMARED 96 /* DWORD bV4GammaRed; */
#define B4H_DGAMMAGREEN 100 /* DWORD bV4GammaGreen; */
#define B4H_DGAMMABLUE 104 /* DWORD bV4GammaBlue; */
#define B5H_DINTENT 108 /* DWORD bV5Intent; */
#define B5H_DPROFILEDATA 112 /* DWORD bV5ProfileData; */
#define B5H_DPROFILESIZE 116 /* DWORD bV5ProfileSize; */
#define B5H_DRESERVED 120 /* DWORD bV5Reserved; */
#define INFOHED_SIZE 40 /* sizeof(BITMAPINFOHEADER) */
#define BMPV4HED_SIZE 108 /* sizeof(BITMAPV4HEADER) */
#define BMPV5HED_SIZE 124 /* sizeof(BITMAPV5HEADER) */
/* BITMAPCOREHEADER */
#define BCH_DSIZE 0 /* DWORD bcSize; */
#define BCH_WWIDTH 4 /* WORD bcWidth; */
#define BCH_WHEIGHT 6 /* WORD bcHeight; */
#define BCH_WPLANES 8 /* WORD bcPlanes; */
#define BCH_WBITCOUNT 10 /* WORD bcBitCount; */
#define COREHED_SIZE 12 /* sizeof(BITMAPCOREHEADER) */
/* RGBQUAD */
#define RGBQ_BLUE 0 /* BYTE rgbBlue; */
#define RGBQ_GREEN 1 /* BYTE rgbGreen; */
#define RGBQ_RED 2 /* BYTE rgbRed; */
#define RGBQ_RESERVED 3 /* BYTE rgbReserved; */
#define RGBQUAD_SIZE 4 /* sizeof(RGBQUAD) */
/* RGBTRIPLE */
#define RGBT_BLUE 0 /* BYTE rgbtBlue; */
#define RGBT_GREEN 1 /* BYTE rgbtGreen; */
#define RGBT_RED 2 /* BYTE rgbtRed; */
#define RGBTRIPLE_SIZE 3 /* sizeof(RGBTRIPLE) */
/* Constants for the biCompression field */
#ifndef BI_RGB
#define BI_RGB 0L /* Uncompressed */
#define BI_RLE8 1L /* RLE (8 bits/pixel) */
#define BI_RLE4 2L /* RLE (4 bits/pixel) */
#define BI_BITFIELDS 3L /* Bitfield */
#define BI_JPEG 4L /* JPEG Extension */
#define BI_PNG 5L /* PNG Extension */
#endif
#endif /* BMPHED_H */
|