diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-03-04 18:31:53 +1100 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-03-04 18:31:53 +1100 |
| commit | 886d280ce1c50d5e9112dd69305dcab96bcce9f1 (patch) | |
| tree | 84d41c26a50c27e9e0f1b81c3ecb96141e209448 | |
| parent | 778c473a19501c6d6a618252bf7b7dcfbac216b5 (diff) | |
feat(bmp): Create section handler's and implement into handler lookup
table
| -rw-r--r-- | include/tinyff/image/bmp.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/tinyff/image/bmp.h b/include/tinyff/image/bmp.h index dbc7b3e..1cf9f31 100644 --- a/include/tinyff/image/bmp.h +++ b/include/tinyff/image/bmp.h @@ -54,13 +54,17 @@ typedef struct { ff_bmp_section_handler_ptr handler; } ff_bmp_section_handler; -const ff_bmp_section_handler ff_png_chunk_handlers[] = { - // TODO: Make handlers +ff_result ff_bmp_header_handler(uint8_t *buf, size_t len, ff_bmp_ctx* ctx); +ff_result ff_bmp_info_handler(uint8_t *buf, size_t len, ff_bmp_ctx* ctx); +ff_result ff_bmp_color_handler(uint8_t *buf, size_t len, ff_bmp_ctx* ctx); +ff_result ff_bmp_data_handler(uint8_t *buf, size_t len, ff_bmp_ctx* ctx); + +const ff_bmp_section_handler ff_bmp_section_handlers[] = { - {"Header", NULL}, - {"InfoHeader", NULL}, - {"ColorTable", NULL}, - {"RasterData", NULL}, + {"Header", ff_bmp_header_handler}, + {"InfoHeader", ff_bmp_info_handler}, + {"ColorTable", ff_bmp_color_handler}, + {"RasterData", ff_bmp_data_handler}, {NULL, NULL} // Terminator }; |
