Live data from Hacker News

The PNG image file format is now more popular than GIF

w3techs.com

101–110 of 111 posts

Re: The PNG image file format is now more popular than GIF

#101

What happened to JPEG 2000? It supports lossless too, but never seen it implemented on browsers.

There was a Firefox extension that supported JPEG 2000, it worked great on the few photography-related websites that used the format.

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).

Re: The PNG image file format is now more popular than GIF

#102

What happened to JPEG 2000? It supports lossless too, but never seen it implemented on browsers.

The image quality improvements with JPEG2000 were mathematical but not really perceptual, see http://www.stat.columbia.edu/~jakulin/jpeg/artifacts.htm

Those photographic comparisons are pretty subjective and zoom in on muddy/blurred areas of the image for comparison - it would have been nice to see the entire photos. The non-photographic images clearly give JPEG2000 an edge, but he then compares it to PNG. Lossy compression isn't for compressing things like pictures of text, which this guy notes but makes the comparison anyway.

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...

Re: The PNG image file format is now more popular than GIF

#103
post #70

Earlier quoted context omitted.

Mozilla is still against it. Makes me kinda angry, actually. They killed MNG/JNG, because it added like 100kB to the installer and because we should just use Flash instead (seriously). It's now a decade later and we still don't have a lossy RGBA format. 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…

Actually this is a non-issue. You could always implement comma separated image fallbacks[1]: 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.o…

That only works for background images. Plus, the UA will send a request for the webp image even if it can't read the format. It needs the mime type to figure that out.

Re: The PNG image file format is now more popular than GIF

#104
post #92
post #70

Earlier quoted context omitted.

Mozilla is still against it. Makes me kinda angry, actually. They killed MNG/JNG, because it added like 100kB to the installer and because we should just use Flash instead (seriously). It's now a decade later and we still don't have a lossy RGBA format. 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…

We do have lossy RGBA that works in all browsers since IE7 (and degrades well in IE4+): 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. http://pngmini.com/vs-webp/

256 colors (well, 256 RGBA tuples) aren't always enough. Just look at the kind of images used by those heavy parallax websites.

Larger photo-based images will always look terrible, no matter which kind of dithering is used.

Re: The PNG image file format is now more popular than GIF

#105
post #104
post #92

Earlier quoted context omitted.

We do have lossy RGBA that works in all browsers since IE7 (and degrades well in IE4+): 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. http://pngmini.com/vs-webp/

256 colors (well, 256 RGBA tuples ) aren't always enough. Just look at the kind of images used by those heavy parallax websites. Larger photo-based images will always look terrible, no matter which kind of dithering is used.

Parallax websites are actually easy, because images are divided into many sprites/layers, so there's many palettes to work with.

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

Re: The PNG image file format is now more popular than GIF

#107
post #103

Earlier quoted context omitted.

Actually this is a non-issue. You could always implement comma separated image fallbacks[1]: 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.o…

That only works for background images. Plus, the UA will send a request for the webp image even if it can't read the format. It needs the mime type to figure that out.

Ah yes. Then probably paste image raw data in the second fallback image? Though I do agree with you that something which benefits the web should be adopted across the board.

Re: The PNG image file format is now more popular than GIF

#108
post #73
post #69

Earlier quoted context omitted.

Actually, in a Retina world, it is often better to use a low quality JPEG at high res, than a high quality PNG at low res.

Well, besides the fact that we don't actually live in a "Retina world", the use of JPEG, even on high quality settings, for an artificial (= not taken from a camera) image pretty much precludes the ability to produce derivative works from it without a much more serious loss of quality. That's not to mention that there are some things which high resolutions cannot make up for, like color bleeding and other pretty seri…

The point is that at high DPI, the "serious fuzzing" is much less noticeable for a variety of images. A retina screen has 4x the amount of pixels. Which means the 2x2 undersampled color errors are probably below our perception threshold. Especially if you pre-blur your high res image to a small degree, acting like an anti-aliasing filter when you scale it down by a factor of e.g. 1.5. For mobile, where users will be zooming a lot anyway, this is a very useful strategy to consider, which can absolutely beat PNG in image quality. Doesn't mean you have to do it everywhere, but I'd prefer it to having to download megabytes of images on retina devices.

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.

Re: The PNG image file format is now more popular than GIF

#109

Earlier quoted context omitted.

This is true for the majority of animations, but .gifs have come to serve a niche for short video content sans audio that they uniquely fulfill on the web. If APNG or MNG or whatever could replace huge animated .gifs for things like r/cinemagraphs I'd be thrilled.

Having seen animated gifs, I can assure you that mngs (pronounced as mings) would be likewise huge. It's better to just have a 1-line JS script do this, and a standard for sandboxing nonthreatening JS.

My understanding is that PNGs are in general smaller than gifs for equivalent quality, so wouldn't the animated version be similarly smaller?

Re: The PNG image file format is now more popular than GIF

#110
post #73

Earlier quoted context omitted.

Well, besides the fact that we don't actually live in a "Retina world", the use of JPEG, even on high quality settings, for an artificial (= not taken from a camera) image pretty much precludes the ability to produce derivative works from it without a much more serious loss of quality. That's not to mention that there are some things which high resolutions cannot make up for, like color bleeding and other pretty seri…

The point is that at high DPI, the "serious fuzzing" is much less noticeable for a variety of images. A retina screen has 4x the amount of pixels. Which means the 2x2 undersampled color errors are probably below our perception threshold. Especially if you pre-blur your high res image to a small degree, acting like an anti-aliasing filter when you scale it down by a factor of e.g. 1.5. For mobile, where users will be…

You've set up a false dichotomy, I think. Why use high-res low-quality images instead of just sticking with low-res high-quality images? It's all going to look fuzzy when you zoom in.

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.

Post reply on HN