News for hackers. Stuff that matters.
Re:The PNG image file format is now more popular than GIF by ahoge on Thursday January 31, 2013 @06:53PM (#5148292)
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 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.

Re:The PNG image file format is now more popular than GIF by monsterix on Friday February 01, 2013 @12:44AM (#5149417)
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.org/csswg/css3-images/#image-fallbacks

And then the fact that Google Chrome has over 30% market share. Makes sense to promote WebP.

Re:The PNG image file format is now more popular than GIF by ahoge on Friday February 01, 2013 @02:25PM (#5152795)
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 by monsterix on Sunday February 03, 2013 @08:29AM (#5159598)
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 by pornel on Friday February 01, 2013 @04:05AM (#5149910)
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/

Re:The PNG image file format is now more popular than GIF by ahoge on Friday February 01, 2013 @02:42PM (#5152933)
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 by pornel on Friday February 01, 2013 @04:31PM (#5153617)
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