Add APNG read/write support - #283
Open
felixbuenemann wants to merge 1 commit into
Open
felixbuenemann wants to merge 1 commit into
felixbuenemann wants to merge 1 commit into
Conversation
Author
|
@randy408 please review |
Core library changes (spng.h, spng.c): - Add acTL, fcTL structs and dispose_op/blend_op enums - Add spng_decode_frame() and spng_encode_frame() APIs - Add spng_get_actl(), spng_set_actl(), spng_get_frame_fctl() - Add APNG error codes and state machine extensions - Add fdAT read/write paths alongside existing IDAT paths - Validate fcTL against the spec: overflow-safe bounds checks, canvas-sized first frame, single fcTL before IDAT - Require the same format for all frames of an image - Reject encoding more frames than declared in acTL - Fix progressive encode for frame 0 (don't clobber encode state) Build system: - Upgrade libpng subproject from 1.6.37 to 1.6.55 - Vendor APNG patch for libpng and fix hIST chunk ordering bug - Add APNG fallback logic to detect and use patched libpng Tests: - Add APNG roundtrip test (3-frame encode/decode with pixel verification) - Add sub-frame regions test (different frame dimensions and offsets) - Add error cases test (invalid acTL/fcTL values, non-APNG decode) - Add progressive decode test (compare scanline-by-scanline vs one-shot) - Add progressive encode roundtrip test - Add buffer vs stream encode comparison test - Add malformed APNG decode tests (duplicate acTL, acTL after IDAT, bad sequence numbers) - Update read fuzzer to exercise spng_decode_frame() on APNG inputs - Update write fuzzer to optionally encode multi-frame APNG Docs: - Update README feature table (APNG no longer "Planned") - Add testing section to build docs
felixbuenemann
force-pushed
the
apng-support
branch
from
June 12, 2026 08:16
2093629 to
51cfb99
Compare
|
What needs to be done to move this forward? |
|
@felixbuenemann could you apply this PR to your own fork perhaps? It appears that the maintainer is away |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spng_decode_frame()andspng_encode_frame()APIs, supporting both one-shot and progressive modesspng_get_actl(),spng_set_actl(),spng_get_frame_fctl(),spng_decode_frame(),spng_encode_frame()API
Test plan