qiqian / webp

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

Webp file converted using "cwebp 4.0" doesn't open in Android 4.4.4 #231

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Convert the attached PNG image (folder.png) to webp using cwebp tool 
(version 4.0) and this command: ./cwebp -q 85 ./folder.png -o output.webp
2. Try opening this output.webp file on Android 4.4.4 device. 
3. In Android, Skia uses libwebp library to decode the file and this webp file 
is not decoded.
4. Now use cwebp tool (version 4.2) and run the same command to compress the 
PNG file.
5. This image opens correctly on the device.

What is the expected output? What do you see instead?
cwebp 4.0 image doesn't open but cwebp 4.2 image opens on Android.
And the file size has increased with the latest cwebp 4.2 tool.
Both output files are attached too.

What version of the product are you using? On what operating system?
Cwebp 4.0 - not working
Cweb4 4.2 - working

Please provide any additional information below.
I have observed this for this specific PNG image. Both output files open in 
Chromium browser but only one opens in Android.

Original issue reported on code.google.com by so...@malhotraz.com on 20 Nov 2014 at 10:57

Attachments:

GoogleCodeExporter commented 8 years ago
Hi -

Can you please confirm which of these 4 webp images (generated via cwebp 4.0) 
fail to open on Android 4.4.4

Following is the naming convention:
bad_ver.q.<noa>.webp - compressed at quality 'q' with cwebp version 'ver' after 
stripping alpha.
bad_ver.q.webp - compressed at quality 'q' with cwebp version 'ver' retaining 
the alpha channel.

Original comment by vik...@google.com on 20 Nov 2014 at 6:20

Attachments:

GoogleCodeExporter commented 8 years ago
BTW, I can open all these 4 webp images in my N5 (ver 5.0) in the G+ photos App 
and also in the 'Downloads' app.

How are you opening these webp images in your Android device ?

Original comment by vikaas.a...@gmail.com on 20 Nov 2014 at 6:26

GoogleCodeExporter commented 8 years ago
Hi,
I am using an Android Canvas test app to open the image on device. It turned 
out to be an issue in Skia.
This issue can be closed, thanks for your time.

While working on this issue, I noticed two things:
1) Cwebp 4.2 is generating slightly bigger Webp files as compared to Cwebp 4.0 
and 4.1
2) Specifying "-lossless" option results in a smaller file as compared to q=85, 
in all the 3 versions I tested - 4.0, 4.1 and 4.2.
Shall I raise separate issues for these or are they known issues ?

Original comment by so...@malhotraz.com on 21 Nov 2014 at 9:12

GoogleCodeExporter commented 8 years ago
Thanks for evaluating WebP for your project.

There was a change in the quality mapping for lossy WebP images post 4.0, so 
it's not a surprise that you are getting little larger (2-5%).
The image that you uploaded corresponds to an icon and such images compresses 
better with '-lossless' option. So no surprise there either. 

Original comment by vik...@google.com on 21 Nov 2014 at 11:41

GoogleCodeExporter commented 8 years ago

Original comment by vikaas.a...@gmail.com on 21 Nov 2014 at 11:42

GoogleCodeExporter commented 8 years ago
Hi,
Thanks for your clarifications. Can you please provide more information about 
this comment:
"The image that you uploaded corresponds to an icon and such images compresses 
better with '-lossless' option. So no surprise there either. "

1) By Icon, do you mean the smaller widthxheight or transparent background or 
both ?
I wish to put an automatic rule in my scripts to convert to either lossless 
webp or "q=85" lossy webp, so any inputs from you will be really helpful. The 
end goal is to have a smaller file size.

Thanks

Original comment by so...@malhotraz.com on 25 Nov 2014 at 11:43