Hacker News new | past | comments | ask | show | jobs | submit login

It's not just lossless/lossy. GIF is also rather primitive; you can store a delta from frame to frame, but the delta has to include every pixel that changed. A lossless animated format invented today wouldn't have that restriction, it would support things like pixel motion (which e.g. H.264 has).

Some years ago there were multiple efforts to produce animated PNGs. There was MNG (Multiple-image Network Graphics, which could contain both PNG and something called JNG) in 2001, and more recently, APNG (Animated PNG) in 2008. The problem here is the spotty support for these formats. AFAIK MNG is effectively dead. I thought APNG was as well (with Firefox being the only browser to support it), but interestingly, the Wikipedia page claims that Safari 8.0 (the upcoming version in OS X 10.10 and iOS 8) supports it. Chrome, Opera, and IE don't, but there is a Canvas-based library for rendering APNG which could presumably be used to polyfill support if you wanted to experiment with APNG.

In any case, the point here is that something like APNG probably has much better compression than GIF while still being lossless (I haven't done any actual comparisons here, but the PNG format itself has support for a lot of fancy compression stuff that GIF doesn't).

---

Reading a bit more, I'm actually really surprised to see that Safari 8.0 apparently supports APNG. It seems that the PNG Group officially rejected APNG back in 2007, which means that libpng will never support APNG.




APNG is used heavily in the gaming (slot machine) industry.


Really? How curious. Why APNG? I would have assumed slot machines would want specific control over their animations and so would use something actually designed for that sort of control.


No idea, but when I worked in a casino for several years you could see the APNG files being loaded during boot.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: