jaewonjoo / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

webp image size is increased when quality value 100 while converting JPG to webp #250

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.compress any .jpg file with quality value 100 using cwebp encoder
2.cmd : cwebp -q 100 input.jpg -o output.webp

What is the expected output? What do you see instead?
Image size should be reduced. 
If i use quality value as 80 then its size does reduces by ~30%
But with quality value 100, size dramatically increased to 470KB of .webp image 
from 173KB of original .jpg image
Same occurs with lossless compression.

But it is working fine with .png files and size of .webp image reduces by 
significant margin.
What should be the correct behaviour ? Is there any problem with the image ?

What version of the product are you using? On what operating system?
Version of libwebp : libwebp-0.4.3
OS - Windows 64-bit

Please provide any additional information below.
I want to replace my .png and .jpg files in android project with .webp to reduce
the app size.
I am verifying these 3 cases :
1. Lossy with 80% quality
2. Lossy with 100% quality
3. Lossless

And above results were produced.

Original issue reported on code.google.com by vahbia...@gmail.com on 4 Jun 2015 at 7:08

GoogleCodeExporter commented 8 years ago
I guess i used the webp encoder the wrong way.
Size does increases if conversion :
1. is from lossy to lossless
2. is from lower quality lossy to higher quality lossy

Not an issue with libwebp tools.

Thanks

Original comment by vahbia...@gmail.com on 4 Jun 2015 at 10:43

GoogleCodeExporter commented 8 years ago
Growing in size is frequent when you're recompressing at a quality that is 
*larger* than the source. You're just adding bits without adding new 
information.

This would happen when recompressing to JPEG for instance. If you take a 
regular JPEG, compressed at q=85 and try to re-compress it at q=100, size will 
grow too.

Try:

 cjpeg -quality 100 -outfile input_new.jpg input.jpg

for instance!

Original comment by pascal.m...@gmail.com on 4 Jun 2015 at 1:25

GoogleCodeExporter commented 8 years ago
ImageMagick's identify is one way to determine the source jpeg quality:

$ identify -verbose image.jpeg |grep Quality

Original comment by jz...@google.com on 4 Jun 2015 at 9:29