summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTazyFoundSoup <gardendistrict0x0@outlook.com>2026-02-15 17:19:12 +1100
committerTazyFoundSoup <gardendistrict0x0@outlook.com>2026-02-15 17:19:12 +1100
commit93520564a4aae6a25420f083eb1c7d73372a4ca0 (patch)
tree21399379761b08974e4e85919b5375168f4b3b47 /include
parentfd05629fb093dab6ae44db4f201a48f65c717288 (diff)
feat(png): Add handler for tRNS ancillary chunk in PNG processing
Diffstat (limited to 'include')
-rw-r--r--include/tinyff/image/png.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/tinyff/image/png.h b/include/tinyff/image/png.h
index 0b0bb3b..3d68fec 100644
--- a/include/tinyff/image/png.h
+++ b/include/tinyff/image/png.h
@@ -82,6 +82,9 @@ ff_result ff_png_palette_handler(uint8_t *buf, size_t len, ff_png_ctx* ctx); //
ff_result ff_png_data_handler(uint8_t *buf, size_t len, ff_png_ctx* ctx); // IDAT
ff_result ff_png_end_handler(uint8_t *buf, size_t len, ff_png_ctx* ctx); // IEND
+// Ancillary chunks
+ff_result ff_png_trans_handler(uint8_t *buf, size_t len, ff_png_ctx* ctx); // tRNS
+
const ff_png_chunk_handler ff_png_chunk_handlers[] = {
{"IHDR", ff_png_header_handler},
@@ -90,7 +93,7 @@ const ff_png_chunk_handler ff_png_chunk_handlers[] = {
{"PLTE", ff_png_palette_handler},
// From now on, the handlers will be for ancillary chunks
-
+ {"tRNS", ff_png_trans_handler},
{NULL, NULL} // Terminator
};