libspng icon indicating copy to clipboard operation
libspng copied to clipboard

Animated PNG (APNG) read support

Open randy408 opened this issue 4 years ago • 4 comments

APNG is an unofficial extension by Mozilla, it allows for animated PNG files that work similarly to animated GIF files, while supporting 24-bit images and 8-bit transparency not available for GIFs.

  • https://wiki.mozilla.org/APNG_Specification
  • https://sourceforge.net/projects/apng/
  • https://commons.wikimedia.org/wiki/Category:Animated_PNG

~~This issue depends on https://github.com/randy408/libspng/issues/40 (row- and chunk callbacks)~~ This would be implemented without callbacks, it should be possible to reuse spng_decode_image() for decoding the APNG frames.

Implementation

  • [x] Parse and validate acTL, fcTL chunks

  • [ ] Implement frame decoding / fdAT parsing

  • [ ] API

Testing

  • [x] ~~Create a libpng-apng repository: https://github.com/randy408/libpng-apng (update to v1.6.39)~~ Went with another approach

  • [x] Modify libpng's meson.build to enable APNG support

  • [x] Replace the current libpng Meson wrap

  • [ ] Add APNG test images

  • [ ] Frame and metadata comparison tests against libpng

Other

  • [ ] Update seed corpus

  • [ ] Update fuzz target

Documentation

  • [ ] API Documentation

  • [ ] Document the new testsuite requirements for distro packagers

  • [ ] Update migration guide

  • [ ] Usage example

Depends on https://github.com/randy408/libspng/issues/10, https://github.com/randy408/libspng/issues/38

randy408 avatar Aug 08 '19 18:08 randy408

Official Animated PNG format is MNG : http://www.libpng.org/pub/mng/

Reference pictures are here : http://www.libpng.org/pub/mng/mngpics.html

Kochise avatar Jul 30 '21 07:07 Kochise

Official Animated PNG format is MNG : http://www.libpng.org/pub/mng

Reference pictures are here : http://www.libpng.org/pub/mng/mngpics.html

Official or not, it is for all intents and purposes dead. It only made it into one major browser, from which it was removed later. APNG is playing in a different league.

In a way, it's the XHTML of png. (no html5-to-apng comparison intended)

MCOfficer avatar Jul 30 '21 07:07 MCOfficer

APNG is now part of PNG Third Edition rather than being documented in a separate extension document.

svgeesus avatar Mar 09 '23 21:03 svgeesus

Does this branch work for apng reading?? Or still more to be done to decode?

mkirkland4874 avatar Feb 17 '24 23:02 mkirkland4874