From 8c6559fc78ec7a60ebac978a48d0bdbae806aadd Mon Sep 17 00:00:00 2001 From: TazyFoundSoup Date: Mon, 16 Feb 2026 12:57:51 +1100 Subject: feat(bmp): Add bitmap --- include/tinyff/image/bmp.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/tinyff/image/bmp.h diff --git a/include/tinyff/image/bmp.h b/include/tinyff/image/bmp.h new file mode 100644 index 0000000..5f7462b --- /dev/null +++ b/include/tinyff/image/bmp.h @@ -0,0 +1,36 @@ +#ifndef BMP_H_ +#define BMP_H_ + +#include +#include +#include +#include +#include + +#include "tinyff/result.h" +#include "tinyff/common.h" +#include "tinyff/stream.h" +#include "tinyff/image/generic.h" + +static const unsigned char BMP_SIGNATURE[2] = { + 'B', 'M' +}; + +typedef struct { + uint32_t file_size; // tbh, i actually have no idea why this is needed + uint32_t data_offset; + + uint32_t width; + uint32_t height; + uint16_t bpp; + uint32_t compression; + uint32_t image_size; + uint32_t x_ppm; // X pixels per meter + uint32_t y_ppm; // Y pixels per meter + uint32_t colors_used; + uint32_t important_colors; + + +} ff_bmp_ctx; + +#endif BMP_H_ \ No newline at end of file -- cgit v1.2.3