summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWatson Wheeler <git@tazy.dev>2026-06-28 14:35:59 +1000
committerWatson Wheeler <git@tazy.dev>2026-07-02 19:39:07 +1000
commitae3b5e3e85e240d68c7a7ee273fbc4020b7293de (patch)
tree55f0758d802ad5391d4b0078b753088f558c49c4
parent743fc3dc9b0b343aa701461bc8e2ac5fbca2aaf8 (diff)
feat(png): store filter method in png_ctx
-rw-r--r--include/tinyff/image/png.h1
-rw-r--r--src/format/image/png.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/tinyff/image/png.h b/include/tinyff/image/png.h
index 5d55b40..e10eea9 100644
--- a/include/tinyff/image/png.h
+++ b/include/tinyff/image/png.h
@@ -36,6 +36,7 @@ typedef struct {
// Color information
uint8_t bit_depth;
uint8_t color_type;
+ uint8_t filter_method;
// Interlace method
uint8_t interlace_method;
diff --git a/src/format/image/png.c b/src/format/image/png.c
index dba6b70..80639a2 100644
--- a/src/format/image/png.c
+++ b/src/format/image/png.c
@@ -210,6 +210,7 @@ ff_result ff_png_header_handler(ff_ctx* ctx, uint8_t *buf, size_t len, ff_png_ct
png_ctx->height = h;
png_ctx->bit_depth = buf[8];
png_ctx->color_type = buf[9];
+ png_ctx->filter_method = buf[11];
png_ctx->interlace_method = buf[12];
ff_dprintf(ctx, "png: IHDR stored in context\n");