The PNG image file format is now more popular than GIF
w3techs.com
w3techs.com
Why hasn't someone forked libpng, added the apng patch and then made it available for WebKit? Then everyone is happy. Just needs a middle-man.
But keep in mind that apng patch only adds a few functions to libpng API, and it's entirely up to applications to actually use those API calls to request extra frames.
Animated GIFs are getting very popular again because even with 5Mb-8Mb sizes GIFs are easier to handle today, comparing to downloading that 200Kb Dancing_Baby.gif in the 90s.
Animated GIFs are still humongous and slow to load, even with today's fast network links... Surely one of the bet reasons to replace them is to actually do a bit better.
Here's your animated png format, put all frames of the animation in a png sprite sheet, and fill early pixels with metadata. Add in a small library and you've got a format that's allows for more advanced animation than gifs, with the better compression and alpha of pngs, and is supported right now in any browser with decent canvas support.
Of course the patents that were the heart of such controversy are now expired so GIF code is no longer 'not-open' but it has a bad reputation so we don't play with it any more :-).
I like PNG though, the library development, while a bit rocky at first, matured quite nicely and about 5 years ago crossed the point where enough people took the time to figure out how to use it that is dropped into everything that dealt with images. That has been pretty handy.
[1]: http://www.totalprosports.com/2012/12/14/the-50-best-sports-...
As far as the actual quality:compression goes (both lossy and lossless), it kicked ass. But with so many free options, why bother?
The output quality is also codec dependent, and the one used in those tests has been shown to be towards the back of the pack in a 2005 shoot-out[1].
There is also no comparison between lossless JPEG2000 and PNG on a photograph.
[1] http://compression.ru/video/codec_comparison/jpeg2000_codecs...
It seems patents killed off the format for widespread acceptance. Maybe we'll actually get to use it in 2020 (when the patents will have expired).
That does not make sense as JPEG doesn't support animation. Regardless, the blurriness caused by normal JPEG-compression levels makes it a bad option for most non-photo images.
I would still argue that images used in the layout of the average site, most of which are already prone to having transparent parts, are better off using a lossless rather than a lossy format.
That said, JPEG does today support lossless compression, if you really want to go there. It sort of even supports transparency[1].
[1] http://news.ycombinator.com/item?id=1772760 for a javascript solution; other approaches use container formats
Even more importantly, frequency-domain compression is really not a very good alternative for most alpha channels for two main reasons.
First, most alpha channels are dominated by large regions of full transparency or full opacity. PNG thrives under those conditions. JPEG does OK.
Second, ring artifacts are a big problem for alpha channels. Whereas a ring artifact in a chroma channel will often be completely imperceptible to the viewer, a ring artifact on an alpha channel can turn transparent pixels opaque. Unless you correct the non-alpha channels to account for those artifacts on the alpha channel, you'll end up with noticeable black halos, even at relatively high quantization. That correction is difficult, and even if you do it well, the results are not stellar.
So while a hybrid format might work well, JPEG + alpha is not as simple as it sounds.
It is very rare that a website has only perfect vector line art in its images. PNG sucks at compressing non-trivial gradients for example.
Also, palette images should get some love too. A high-res dithered GIF or 8-bit PNG might meet your needs (looks good on retina displays at normal zoom, stays crisp when zoomed in, smallish file size) better than the other options.
I wouldn't be surprised if those short videos were the bulk of the GIFs around. At least of the GIFs actually used and being dormant in some long forgotten archives.
There are a lot of cases where PNGs are superior, mostly because of the extra color depth. But that's not enough for a speedy transition.
I'm not sure off the top of my head what HTML 5 market share is like (anyone with recent data want to chime in?), but I'm guessing lots of people are running browsers that still don't have <video> capability.
The percentage of users not able to use <video> is roughly equivalent to the percentage of users running IE8, which is about 20% right now, and probably will stay there in the near future, as XP users cannot upgrade to IE9 (thanks, MS!).
The other problem with <video> is that there is still no common format which every browser supports, so even if you would ignore IE8 (or provide a fallback via Flash) you'd still have to encode all videos twice (to H.264 and WebM/VP8).
Sad as it is, but Flash for video and animated GIF will stay with us for some years.
I've worked with a couple web designers and developers that said "Gif" to mean any image, as in "Move that gif up twenty pixels" when referring to a logo that's actually JPEG. I think it's a holdover from the days of BBSes and AOL and CompuServe, where everything really was a GIF. "Check out this new cheerleader Gif I got." It's not a far leap to imagine these users just out of habit and familiarity clicking GIF in the save-as dialog without really thinking about it. So GIF persists out of familiarity and inertia.
BUT APNG does: http://en.wikipedia.org/wiki/APNG
basically, if you use just few colors and no semi-transparency and you picture is small - yo might be better off with GIF, otherwise - either PNG or JPG depending on if you need semi-transparency or not, and if you need loss-less compression or not.
https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#M...
http://web.archive.org/web/19991127200821/http://www.interne...
Anyone else remember this?
PNG has been more popular than GIF since a very long time for basically anything non-web needing lossless picture compression.
From smartphones icons to OS icons, software logos and icons, etc. I'd say the proportion is about 100:1. Actually I was suprised while just running a "find" on my Linux distro to even find a few .gif files. But thousands of PNGs, of course.
Screenshots taken from OS X and Linux are saved to PNG files (for OS X it actually depends on the version of OS X, sometimes PDF are used, but not GIFs).
And games... Lots of games ship with PNG pictures (as well as jpg of course). But GIF? Common...
It's actually a very, very long time that PNG files are more popular than GIFs.
Glad to hear that it's now true for the Web too.
You can really save screenies in whatever format you like on linux with imagemagick.
It's just $ import -window root screenshot.<imagetype>
Unless you're referring to whatever the DE has implemented, but I've never taken an SS without using the terminal, so I have no idea.
screencapture -tjpg desktop.jpgBoth of those problems can be easily fixed (in most cases) by using iepngfix for IE6 and stripping gamma information from your PNGs (which you should do anyway, to minimize the size of your images). I've been using PNGs successfully in my projects for several years, and during most of those years I had to support IE6/7. In fact, if you need to support any version of IE, PNG should be the least of your problems.
It could be even more easily fixed by using GIFs instead. I assume that's what many people thought. Thankfully, IE6 is finally dead and no one have to worry about PNGs anymore.
Only the full alpha that GIF doesn't support at all isn't working properly (but can be made to work since IE5.5).
http://calendar.perfplanet.com/2010/png-that-works/#paletted
> But GIF? Common...
I think you mean uncommon.Any live websites using it?
If quantized PNG8s aren't good enough, you can only use gigantic PNG32 files, which are over 5 times larger than JNG or WebP files. I've seen websites which were over 5MB thanks to that limitation. It's ridiculous.
I wish they had at least kept JNG. It's a fairly simple JPG/PNG mashup format. If you already use JPG and PNG libraries, supporting JNG won't add much weight.
background-image: image("wavy.svg", 'wavy.png' , "wavy.gif"); and so on...
It seems that Google lowered emphasis on the project, or is still working on it behind-the-scenes. I'd much prefer to have 'less of images' moving over the web (without cutting back on visuals, you know) and save precious bandwidth.
[1] http://dev.w3.org/csswg/css3-images/#image-fallbacks
And then the fact that Google Chrome has over 30% market share. Makes sense to promote WebP.
http://pngquant.org http://tinypng.org
And while it's not as good as WebP, it's 20% of the filesize you get from Photoshop.
Larger photo-based images will always look terrible, no matter which kind of dithering is used.
I've got a pretty large collection of PNGs to test quantisation on and 68% of them end up converted in great quality, 89% are within acceptable range. It's about double of what you can get with Fireworks.
And for images that can't absolutely fit in 256-colors there's a hack for lossy true-color PNGs that can reduce size by 20-40%: https://github.com/pornel/mediancut-posterizer
Given the huge effort required to get any sort of widespread adoption of a new format—and without widespread adoption there's little point unless you've got some unusual features (which WebP didn't)—I'm not sure there was ever much chance WebP would go anywhere.
I'm generally no fan of Microsoft, but MS's new image format, JPEG XR†, seems vastly superior to WebP in almost every way... and it actually does have compelling new features.
No animations duh.
Even google isn't using it on thier websites. That says a lot.
http://blog.chromium.org/2013/02/using-webp-to-improve-speed...
An official update from Google.