#ifndef lexlib_internal_bmpheaders_h
#define lexlib_internal_bmpheaders_h
#include<stdint.h>
#define BMP_RGB 0
#define BMP_RLE8 1
#define BMP_RLE4 2
#define BMP_BITFIELDS 3
#define BMP_JPEG 4
#define BMP_PNG 5
#define BMP_ALPHABITFIELDS 6
#define BMP_CMYK 11
#define BMP_CMYKRLE8 12
#define BMP_CMYKRLE4 13
#pragma pack(push, 1)
typedef struct BmpFileHeader {
uint16_t type;
uint32_t size;
uint16_t reserved1;
uint16_t reserved2;
uint32_t offset;
} BmpFileHeader;
#pragma pack(pop)
typedef struct BmpCoreHeader {
uint32_t size;
uint16_t width;
uint16_t height;
uint16_t planes;
uint16_t bitdepth;
} BmpCoreHeader;
typedef struct BmpInfoHeader {
uint32_t size;
int32_t width;
int32_t height;
uint16_t planes;
uint16_t bitdepth;
uint32_t compression;
uint32_t imagesize;
int32_t xresm;
int32_t yresm;
uint32_t colorPalette;
uint32_t colorImportant;
} BmpInfoHeader;
typedef struct BmpInfoHeader3 {
uint32_t size;
int32_t width;
int32_t height;
uint16_t planes;
uint16_t bitdepth;
uint32_t compression;
uint32_t imagesize;
int32_t xresm;
int32_t yresm;
uint32_t colorPalette;
uint32_t colorImportant;
uint32_t redbitmask;
uint32_t greenbitmask;
uint32_t bluebitmask;
uint32_t alphabitmask;
} BmpInfoHeader3;
typedef struct BmpInfoHeader4 {
uint32_t size;
int32_t width;
int32_t height;
uint16_t planes;
uint16_t bitdepth;
uint32_t compression;
uint32_t imagesize;
int32_t xresm;
int32_t yresm;
uint32_t colorPalette;
uint32_t colorImportant;
uint32_t redbitmask;
uint32_t greenbitmask;
uint32_t bluebitmask;
uint32_t alphabitmask;
uint32_t cstype;
int32_t endpoint[3][3];
uint32_t redgamma;
uint32_t greengamma;
uint32_t bluegamma;
} BmpInfoHeader4;
typedef struct BmpInfoHeader5 {
uint32_t size;
int32_t width;
int32_t height;
uint16_t planes;
uint16_t bitdepth;
uint32_t compression;
uint32_t imagesize;
int32_t xresm;
int32_t yresm;
uint32_t colorPalette;
uint32_t colorImportant;
uint32_t redbitmask;
uint32_t greenbitmask;
uint32_t bluebitmask;
uint32_t alphabitmask;
uint32_t cstype;
int32_t endpoint[3][3];
uint32_t redgamma;
uint32_t greengamma;
uint32_t bluegamma;
uint32_t intent;
uint32_t profiledata;
uint32_t profilesize;
uint32_t reserved;
} BmpInfoHeader5;
#endif