Files

40 lines
716 B
C++

#ifndef BMP_HPP
#define BMP_HPP
#include <stdint.h>
#pragma pack(push, 1)
namespace bmp {
struct FileHeader {
uint16_t type;
uint32_t size;
uint16_t reserved1;
uint16_t reserved2;
uint32_t offBits;
};
struct InfoHeader {
uint32_t size;
int32_t width;
int32_t height;
uint16_t planes;
uint16_t bitCount;
uint32_t compression;
uint32_t sizeImage;
int32_t xPixelsPerMeter;
int32_t yPixelsPerMeter;
uint32_t colorsUsed;
uint32_t colorsImportant;
};
struct BMPColorHeader {
uint32_t red;
uint32_t green;
uint32_t blue;
uint32_t alpha;
uint32_t colorSpaceType;
uint32_t unused[16];
};
}
#pragma pack(pop)
#endif