3 ms·
How much of a gain do you get in WebP versus a properly optimized PNG for icons? I can't imagine it's a compelling difference.
by milsorgen 12y ago
How much of a gain do you get in WebP versus a properly optimized PNG for icons? I can't imagine it's a compelling difference.
- wodenokoto 12y agoSimple 2 or 3 color icons might not win a lot, but there is also a whole genre of photo-realistic icons which would have a lot to gain from WebP like formats.
- milsorgen 12y agoI've been trying to pull up some data but I keep coming back to JPG v. WebP. Got a link to anything by chance?
- ZeroGravitas 12y agohttp://geeks.everything.me/2013/04/24/why-we-like-webp/ http://geeks.everything.me/2013/04/24/why-we-like-webp/ Suggests a 5x benefit over PNG for mobile app icons.
- milsorgen 12y agoI appreciate the information, thank you!
- pornel 12y agoGoogle's own marketing materials claim 25-33% improvement at the same quality, so 5x improvement suggests they didn't compare apples to apples. Comparing formats in a fair way is hard. "Looks almost the same" is a common fallacy — small change in quality can have dramatic change in file size, e.g. JPEG 80 and JPEG 90 look almost the same, but one is 2x larger than the other! For example lossy WebP doesn't support full color resolution, but JPEG by default does. If you don't correct for that you're telling JPEG to save 4x as much color, and the difference is usually imperceptible, because that's the whole point of chroma subsampling.
- dvirsky 12y agoRead the doc - the suggested x5 improvement is compared to PNG, which is the only other way to currently solve the problem of an icon with transparent edges (let's leave GIF aside), not compared to JPEG. The gain compared to JPEG was about 50%.
- pornel 12y agoIf they compared PNG with lossless WebP the difference would be small (lossless WebP is still using gzip, just with smarter preprocessing). When you compare with lossy WebP, then the right thing is to use lossy PNG as well. I can make lossy PNG 4 times smaller than what you get from Photoshop (http://pngmini.com http://pngmini.com), so that'd make the comparison more fair, and the difference less dramatic.
- acdha 12y agoThe person you're replying to wrote a library which does lossy PNG compresssion which would be ideal for these use cases: https://github.com/pornel/pngquant https://github.com/pornel/pngquant
- deleted 12y ago[deleted]