diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-03-10 19:26:50 +1100 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-03-10 19:26:50 +1100 |
| commit | 072ee2558ac6c057626df58dc3a34c17546cd1a8 (patch) | |
| tree | 19c3b89a7debac4aa44b12e536ed7f23f86b6656 /include/tinyff/image | |
| parent | 886d280ce1c50d5e9112dd69305dcab96bcce9f1 (diff) | |
feat(bmp): Add section size definitions and macro for color table
Diffstat (limited to 'include/tinyff/image')
| -rw-r--r-- | include/tinyff/image/bmp.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/tinyff/image/bmp.h b/include/tinyff/image/bmp.h index 1cf9f31..80aaa4d 100644 --- a/include/tinyff/image/bmp.h +++ b/include/tinyff/image/bmp.h @@ -11,6 +11,11 @@ #include <tinyff/stream.h> #include <tinyff/image/generic.h> +#define FF_BMP_HEADER_SIZE 14 +#define FF_BMP_INFO_SIZE 40 +#define FF_BMP_COLOR_TABLE_SIZE(bpp, clrused) \ + ((bpp) <= 8 ? (4 * ((clrused) ? (clrused) : (1u << (bpp)))) : 0) + static const unsigned char BMP_SIGNATURE[2] = { 'B', 'M' }; |
