diff options
| author | tazy <gardendistrict0x0@outlook.com> | 2026-01-04 21:19:13 +0000 |
|---|---|---|
| committer | tazy <gardendistrict0x0@outlook.com> | 2026-01-04 21:19:13 +0000 |
| commit | d33aeddbfb1510c7a1846067c5512cfb942ccb17 (patch) | |
| tree | 635055db5399af3d9b3e87b5a5241a3886e1090b /include/tinyff/image/png.h | |
| parent | ab3873609baf282f9158566c8242be2c9b126f5d (diff) | |
feat(dbg): Add debugging to png.c
Diffstat (limited to 'include/tinyff/image/png.h')
| -rw-r--r-- | include/tinyff/image/png.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/tinyff/image/png.h b/include/tinyff/image/png.h index b2f400f..80e8fe6 100644 --- a/include/tinyff/image/png.h +++ b/include/tinyff/image/png.h @@ -38,7 +38,7 @@ typedef struct { // Chunk handling -typedef (*ff_png_chunk_handler_ptr)(uint8_t *data, size_t len, ff_png_ctx* ctx); +typedef (*ff_png_chunk_handler_ptr)(uint8_t *buf, size_t len, ff_png_ctx* ctx); typedef struct { const char *type; @@ -54,7 +54,17 @@ const ff_png_chunk_handler ff_png_chunk_handlers[] = { {NULL, NULL} // Terminator }; -void ff_png_header_handler(uint8_t *data, size_t len, ff_png_ctx* ctx); +// Handler declarations +// Massive W.I.P + +// Required by definition +void ff_png_header_handler(uint8_t *buf, size_t len, ff_png_ctx* ctx); // IHDR +void ff_png_data_handler(uint8_t *buf, size_t len, ff_png_ctx* ctx); // IDAT +void ff_png_end_handler(uint8_t *buf, size_t len, ff_png_ctx* ctx); // IEND + +// PLTE is a funny one +// Its only required for indexed color types + ff_result ff_png_isvalid(FILE *file); ff_result ff_open_png(const char *filepath, ff_png_ctx **out_ctx); |
