diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-05-11 07:49:18 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-05-11 07:49:18 -0400 |
commit | dffd910115fb0b36310bb7b32ad0650727d58216 (patch) | |
tree | 8356bde5ceedf93e24a1078dd8112028a7f76ce6 /include/bmpimage.hpp | |
parent | a9abee3d7b57a094358ffbb460799d70fed7ef8b (diff) |
clamp bug fix
Diffstat (limited to 'include/bmpimage.hpp')
-rw-r--r-- | include/bmpimage.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/bmpimage.hpp b/include/bmpimage.hpp new file mode 100644 index 0000000..69b78ac --- /dev/null +++ b/include/bmpimage.hpp @@ -0,0 +1,34 @@ +#ifndef BMP_IMAGE_HPP +#define BMP_IMAGE_HPP + +#include <cstdint> + +/** + * Defines the layout of a bitmap (.bmp) file's header. + */ +typedef struct { + uint16_t bfType; + uint32_t bfSize; + uint16_t bfReserved1; + uint16_t bfReserved2; + uint32_t bfOffBits; +} __attribute__((packed)) BITMAPFILEHEADER; + +/** + * Defines the layout of a bitmap's info header. + */ +typedef struct { + uint32_t biSize; + int32_t biWidth; + int32_t biHeight; + uint16_t biPlanes; + uint16_t biBitCount; + uint32_t biCompression; + uint32_t biSizeImage; + int32_t biXPelsPerMeter; + int32_t biYPelsPerMeter; + uint32_t biClrUsed; + uint32_t biClrImportant; +} __attribute__((packed)) BITMAPINFOHEADER; + +#endif // BMP_IMAGE_HPP |