qiqian / webp

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

-alpha_cleanup does nothing in lossless mode (version 0.4.0) #186

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run cwebp on a PNG-32 with dirty "transparent pixels" using -lossless 
-alpha_cleanup produces the same file as -lossless without -alpha_cleanup

What is the expected output? What do you see instead?
I would have expected two different files -alpha_cleanup should have turned 
dirty transparent pixels to black or something like this.

What version of the product are you using? On what operating system?
version 0.4.0 on OS X Lion

Please provide any additional information below.
I did the alpha_cleanup with a different tool (pngcrush -blacken or cryopng 
-f0) and it effectively reduces the webp lossless file size. Using cryopng -f4 
brings its size even further down.

How the following files have been produced:
sample_56.png (unoptimized Google logo)
sample_56bl.png (pngcrush -blacken sample_56.png sample_56bl.png)
sample_56f0.png (cp sample_56.png sample_56f0.png ; cryopng -f0 sample_56f0.png)
sample_56f4.png (cp sample_56.png sample_56f4.png ; cryopng -f4 sample_56f4.png)

sample_56.webp (cwebp sample_56.png -lossless -q 90 -o sample_56.webp)
sample_56ac.webp (cwebp sample_56.png -lossless -alpha_cleanup -q 90 -o 
sample_56ac.webp)
sample_56bl.webp (cwebp sample_56bl.png -lossless -q 90 -o sample_56bl.webp)
sample_56f0.webp (cwebp sample_56f0.png -lossless -q 90 -o sample_56f0.webp)
sample_56f4.webp (cwebp sample_56f4.png -lossless -q 90 -o sample_56f4.webp)

File sizes in bytes:
24897 sample_56.png
14151 sample_56bl.png
14153 sample_56f0.png
13798 sample_56f4.png

20754 sample_56.webp
20754 sample_56ac.webp
13238 sample_56bl.webp
13238 sample_56f0.webp
11936 sample_56f4.webp

Original issue reported on code.google.com by cryo...@free.fr on 31 Jan 2014 at 8:35

Attachments:

GoogleCodeExporter commented 8 years ago
this was noticed and fixed posterior to the libwebp 0.4.0

Sorry this went through the cracks.

The patch is: https://gerrit.chromium.org/gerrit/#/c/68396/

Original comment by pascal.m...@gmail.com on 31 Jan 2014 at 9:02