Skip to content

Conversation

@jbowler
Copy link
Contributor

@jbowler jbowler commented Jun 22, 2025

  • Introduce APNG support -- patch applied, animations unlocked!
  • refactor: Tidy up the APNG-supporting code
  • Handle APNG and Apple chunks correctly

ctruta and others added 2 commits June 16, 2025 15:51
Co-authored-by: Daisuke Nishikawa <daisuken@users.sourceforge.net>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
Delete redundant initializations, rename macros, rephrase messages,
tidy up comments, etc.
@jbowler jbowler mentioned this pull request Jun 22, 2025
pngset.c now includes the APNG chunks in the list of chunks to ignore
when png_set_keep_unknown_chunks is called to ignore all ancillary
chunks.

contrib/tools/pngcp.c uses this to correctly copy APNG chunks and other
known unsafe-to-copy chunks that pngcp can safely copy.  The change also
means that Apple's private banding chunk is not copied; it apparently
relies on the exact layout of the IDAT data.

Signed-off-by: John Bowler <jbowler@acm.org>
@jbowler
Copy link
Contributor Author

jbowler commented Jun 23, 2025

Remove the spurious reset of the 'keep' unknown setting and document the behavior of png_set_keep_unknown_chunks correctly. Also remove the unnecessary change to handling of safe-to-copy known chunks.

@svgeesus svgeesus requested a review from ctruta June 24, 2025 13:47
@jbowler
Copy link
Contributor Author

jbowler commented Jun 27, 2025

Note that I have a lot more changes. I stopped trying to break them down because it was clear that I couldn't keep working on the APNG stuff without changes I'd already mentioned in the code reviews and doing just code review when there are so many changes was simply not going to achieve anything. Specifically it takes me about an hour to explain something that I can fix in a minute.

Anyway, current state (still definitely a WIP) is in the branch https://github.com/jbowler/libpng/tree/libpng2-apng

So far it's going well and things are getting a lot simpler. The APNG patch adds about 40K on AMD64 to the 250K libpng DLL but I think these changes will considerably reduce the size from 290K, but I've only managed to save 3K so far :-(

Copy link
Member

@ctruta ctruta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, approved, and integrated in trunk (although GitHub didn't notice).

@ctruta ctruta closed this Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants