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

I've been trying to pull up some data but I keep coming back to JPG v. WebP. Got a link to anything by chance?



http://geeks.everything.me/2013/04/24/why-we-like-webp/

Suggests a 5x benefit over PNG for mobile app icons.


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


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


If 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), so that'd make the comparison more fair, and the difference less dramatic.


The 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


I appreciate the information, thank you!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: