Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between APNG and MNG?

I know that APNG is an extension of PNG, while MNG is more of its own format (albeit developed by the original PNG developers). MNG is barely supported in any browser at all, while APNG almost only has native support in Firefox (for various backward compatibility- and decoding-related reasons, it seems).

Except all of these behind-the-scenes things, what are the differences between APNG and MNG? Does one have features the other doesn't (for example, storing only parts that are modified instead of always whole frames)? Does one have better performance or file size than the other?

like image 679
obskyr Avatar asked Mar 24 '14 15:03

obskyr


1 Answers

APNG can create a new frame by replacing the entire image or by overlaying or blending a smaller image over part of it. To display a "pong" game you'd need a new image of the ball in each different location. APNG has essentially the same capabilities as animated GIF, but also allowing 24bit RGB and 8-bit alpha.

MNG can do that, plus it can also retrieve an image that was previously defined in the datastream and place it over the previous frame in a new location. To display your "pong" game you'd only need to transmit one image of the ball and use it like a sprite.

Much more detail is available in the specifications:

apng: (https://wiki.mozilla.org/APNG_Specification‎)

mng: (http://www.libpng.org/pub/mng/spec/mng-lc.html)

like image 126
Glenn Randers-Pehrson Avatar answered Sep 27 '22 23:09

Glenn Randers-Pehrson