lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #ifndef BMPHED_H |
| 2 | #define BMPHED_H |
| 3 | |
| 4 | #ifndef BI_RGB |
| 5 | #define BI_RGB 0L /* Uncompressed */ |
| 6 | #define BI_RLE8 1L /* RLE (8 bits/pixel) */ |
| 7 | #define BI_RLE4 2L /* RLE (4 bits/pixel) */ |
| 8 | #define BI_BITFIELDS 3L /* Bitfield */ |
| 9 | #define BI_JPEG 4L /* JPEG Extension */ |
| 10 | #define BI_PNG 5L /* PNG Extension */ |
| 11 | #endif |
| 12 | |
| 13 | #define BIH_DSIZE 0 /* DWORD biSize; */ |
| 14 | #define BIH_LWIDTH 4 /* LONG biWidth; */ |
| 15 | #define BIH_LHEIGHT 8 /* LONG biHeight; */ |
| 16 | #define BIH_WPLANES 12 /* WORD biPlanes; */ |
| 17 | #define BIH_WBITCOUNT 14 /* WORD biBitCount; */ |
| 18 | #define BIH_DCOMPRESSION 16 /* DWORD biCompression; */ |
| 19 | #define BIH_DSIZEIMAGE 20 /* DWORD biSizeImage; */ |
| 20 | #define BIH_LXPELSPERMETER 24 /* LONG biXPelsPerMeter; */ |
| 21 | #define BIH_LYPELSPERMETER 28 /* LONG biYPelsPerMeter; */ |
| 22 | #define BIH_DCLRUSED 32 /* DWORD biClrUsed; */ |
| 23 | #define BIH_DCLRIMPORANT 36 /* DWORD biClrImportant; */ |
| 24 | #define B4H_DREDMASK 40 /* DWORD bV4RedMask; */ |
| 25 | #define B4H_DGREENMASK 44 /* DWORD bV4GreenMask; */ |
| 26 | #define B4H_DBLUEMASK 48 /* DWORD bV4BlueMask; */ |
| 27 | #define B4H_DALPHAMASK 52 /* DWORD bV4AlphaMask; */ |
| 28 | #define B4H_DCSTYPE 56 /* DWORD bV4CSType; */ |
| 29 | #define B4H_XENDPOINTS 60 /* CIEXYZTRIPLE bV4Endpoints; */ |
| 30 | #define B4H_DGAMMARED 96 /* DWORD bV4GammaRed; */ |
| 31 | #define B4H_DGAMMAGREEN 100 /* DWORD bV4GammaGreen; */ |
| 32 | #define B4H_DGAMMABLUE 104 /* DWORD bV4GammaBlue; */ |
| 33 | #define B5H_DINTENT 108 /* DWORD bV5Intent; */ |
| 34 | #define B5H_DPROFILEDATA 112 /* DWORD bV5ProfileData; */ |
| 35 | #define B5H_DPROFILESIZE 116 /* DWORD bV5ProfileSize; */ |
| 36 | #define B5H_DRESERVED 120 /* DWORD bV5Reserved; */ |
| 37 | #define INFOHED_SIZE 40 /* sizeof(BITMAPINFOHEADER) */ |
| 38 | #define BMPV4HED_SIZE 108 /* sizeof(BITMAPV4HEADER) */ |
| 39 | #define BMPV5HED_SIZE 124 /* sizeof(BITMAPV5HEADER) */ |
| 40 | |
| 41 | #define BCH_DSIZE 0 /* DWORD bcSize; */ |
| 42 | #define BCH_WWIDTH 4 /* WORD bcWidth; */ |
| 43 | #define BCH_WHEIGHT 6 /* WORD bcHeight; */ |
| 44 | #define BCH_WPLANES 8 /* WORD bcPlanes; */ |
| 45 | #define BCH_WBITCOUNT 10 /* WORD bcBitCount; */ |
| 46 | #define COREHED_SIZE 12 /* sizeof(BITMAPCOREHEADER) */ |
| 47 | |
| 48 | #define RGBQ_BLUE 0 /* BYTE rgbBlue; */ |
| 49 | #define RGBQ_GREEN 1 /* BYTE rgbGreen; */ |
| 50 | #define RGBQ_RED 2 /* BYTE rgbRed; */ |
| 51 | #define RGBQ_RESERVED 3 /* BYTE rgbReserved; */ |
| 52 | #define RGBQUAD_SIZE 4 /* sizeof(RGBQUAD) */ |
| 53 | |
| 54 | #define RGBT_BLUE 0 /* BYTE rgbtBlue; */ |
| 55 | #define RGBT_GREEN 1 /* BYTE rgbtGreen; */ |
| 56 | #define RGBT_RED 2 /* BYTE rgbtRed; */ |
| 57 | #define RGBTRIPLE_SIZE 3 /* sizeof(RGBTRIPLE) */ |
| 58 | |
| 59 | #define BMP_SIGNATURE 0x4D42 |
| 60 | #define BMP_SIG_BYTES 2 |
| 61 | |
| 62 | #define BFH_WTYPE 0 /* WORD bfType; */ |
| 63 | #define BFH_DSIZE 2 /* DWORD bfSize; */ |
| 64 | #define BFH_WRESERVED1 6 /* WORD bfReserved1; */ |
| 65 | #define BFH_WRESERVED2 8 /* WORD bfReserved2; */ |
| 66 | #define BFH_DOFFBITS 10 /* DWORD bfOffBits; */ |
| 67 | #define BFH_DBIHSIZE 14 /* DWORD biSize; */ |
| 68 | #define FILEHED_SIZE 14 /* sizeof(BITMAPFILEHEADER) */ |
| 69 | #define BIHSIZE_SIZE 4 /* sizeof(biSize) */ |
| 70 | |
| 71 | #endif /* BMPHED_H */ |