From 88dbada3c82e2ed7b3daa1ce3e992b2d30adb715 Mon Sep 17 00:00:00 2001 From: Watson Wheeler Date: Sun, 28 Jun 2026 14:35:59 +1000 Subject: feat(png): store filter method in png_ctx --- include/tinyff/image/png.h | 1 + src/format/image/png.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/tinyff/image/png.h b/include/tinyff/image/png.h index fb064db..91ec477 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 dfd3230..51cc979 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"); -- cgit v1.2.3