Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JPG vs compressed JPG vs WEBP - why WEBP isn't the smallest one?

I have this image (photo taken by me on SGS 9 plus): Uncompressed JPG image. Its size is 4032 x 3024 and its weight is around 3MB. I compressed it with TinyJPG Compressor and its weight was 1.3MB. For PNG images I used Online-Convert and I saw webp images much more smaller even than compressed with TinyPNG. I expected something similar, especially that I read an article JPG to WebP – Comparing Compression Sizes where WEBP is much smaller that compressed JPG. But when I convert my JPG to WEBP format in various online image convertion tools, I see 1.5-2MB size, so file is bigger than my compressed JPG. Am I missing something? WEBP should not be much smaller than compressed JPG? Thank you in advance for every answer.

like image 835
Radek Anuszewski Avatar asked Sep 09 '18 15:09

Radek Anuszewski


People also ask

Is WebP smaller than JPG?

The study evaluated WebP compression in comparison to JPEG. We observed that the average WebP file size is 25%-34% smaller compared to JPEG file size at equivalent SSIM index.

Why are WebP files so small?

The WebP format was developed by Google to reduce the size of compressed images without losing quality. The company does this by using predictive coding similar to that used in encoding video keyframes. Google's research shows it has managed to successfully compress images into significantly smaller file sizes.

Are WebP files smaller?

WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller than comparable JPEG images at equivalent SSIM quality index. Lossless WebP supports transparency (also known as alpha channel) at a cost of just 22% additional bytes.

Is WebP smaller than GIF?

WebP requires fewer bytes than GIF1. Animated GIFs converted to lossy WebPs are 64% smaller, while lossless WebPs are 19% smaller. This is especially important on mobile networks.


1 Answers

My experience is that lossy WebP is superior below quality 70 (in libjpeg terms) and JPEG is often better than WebP at quality 90 and above. In between these qualities it doesn't seem to matter much.

I believe WebP qualities are inflated about 7 points, i.e., to match JPEG quality 85 one needs to use WebP quality 92 (when using the cwebp tool). I didn't measure this well, this is based on rather ad hoc experiments and some butteraugli runs.

Lossy WebP has difficulties compressing complex textures such as leafs of trees densely, whereas JPEGs difficulties are with thin lines against flat borders, like a telephone line hanging against the sky or computer graphics.

like image 103
Jyrki Alakuijala Avatar answered Oct 30 '22 08:10

Jyrki Alakuijala