nothings / stb

stb single-file public domain libraries for C/C++
https://twitter.com/nothings
Other
26.5k stars 7.69k forks source link

APNG support #132

Closed bigfatbrowncat closed 9 years ago

bigfatbrowncat commented 9 years ago

I understand that it may be beyond any means, but is it possible to add Animated PNG support to stb_image? That would improve the experience much (make lossless animations possible).

This is APNG specification: https://wiki.mozilla.org/APNG_Specification

This is the "official" Mozilla patch for the libpng: http://sourceforge.net/projects/libpng-apng (maybe you'll find it useful) An example of animated image: http://tamalesyatole.deviantart.com/art/I-want-to-be-a-Hero-APNG-Animated-332248278 (In an unsupported browser you'll just see the first frame) Console encoder: http://sourceforge.net/projects/apngasm/files/latest/download (it encodes series of PNG images into a single animated file).

For the interested: APNG is an extension for PNG format which encodes time changes (makes it possible to make an animation). It's a simple and useful video codec that is natively supported in Firefox and Safari 8.

Is it interesting? Is it hard to implement?

nothings commented 9 years ago

This has the same issue as animated GIF: the API needs to be very different, so I don't think it fits with what stb_image is trying to be.