bachphuc / webp

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

webpiosapp-0.2.0 app can not correctly display full transparent Webp files(converted by cwebp) #131

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce the problem:

1.covert the attached full transparent png file to webp:

cwebp.exe -alpha_q 100 -o transparent.webp  transparent.png
(use cwebp form libwebp-0.2.0-windows-x86.zip)

2.open the generated transparent.png on Windows 7 (using Webp WIC codec), it is 
full transparent.

3. open the transparent.png in webpiosapp-0.2.0 app, it will be shown as a full 
white picture,instead of full transparent.  

Original issue reported on code.google.com by zk.Talen...@gmail.com on 18 Oct 2012 at 3:15

GoogleCodeExporter commented 9 years ago
Sorry I forgot to attach the transparent.png.

Original comment by zk.Talen...@gmail.com on 18 Oct 2012 at 3:16

Attachments:

GoogleCodeExporter commented 9 years ago
At step 2. and 3., i guess you meant "transparent.webp" instead of 
"transparent.png", right?

For definiteness, i attach the fully transparent test file 'transparent.webp'.

Original comment by pascal.m...@gmail.com on 22 Oct 2012 at 1:29

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks to Pascal, the step 2 & 3 should be:

2.open the generated transparent.webp on Windows 7 (using Webp WIC codec), it 
is full transparent.

3. open the transparent.webp in webpiosapp-0.2.0 app, it will be shown as a 
full white picture,instead of full transparent.  

We are using WebP in an iOS digital magazine app. The WebP format can 
dramatically reduce the magazine file size to 40% because it contains many big 
pictures. So it's very appreciated if WebP team can resolve this problem.

Original comment by zk.Talen...@gmail.com on 23 Oct 2012 at 12:30

GoogleCodeExporter commented 9 years ago
How does this picture looks like when opened in Chrome ?
If you open any other transparent images (like penguin.webp or flower.webp) 
available in the example iOS app (webpiosapp-0.2.0), you would see these images 
with white transparent background canvas.
The transparent.webp image have all pixels (253x42) with Alpha value as 0 
(fully transparent) and RGB value as (0xff, 0xff, 0xff). When this image is 
rendered in Chrome or in this iOS App, alpha values are pre-multiplied to RGB 
values and will look white (with white background canvas).

In case you have other images as well to try, can you check whether other 
images look OK with webpiosapp-0.2.0 app.

Original comment by vikaas.a...@gmail.com on 24 Oct 2012 at 12:56

GoogleCodeExporter commented 9 years ago
While you try this iOS App for other images, you can change (two lines: 108, 
126) in the WebPImage.m file to change the decoder colorspace from MODE_RGBA to 
MODE_rgbA ('config.output.colorspace = MODE_RGBA;' to 'config.output.colorspace 
= MODE_rgbA;')

Original comment by vikaas.a...@gmail.com on 24 Oct 2012 at 2:14

GoogleCodeExporter commented 9 years ago
Thanks to vikaas!

Changing from MODE_RGBA to MODE_rgbA has resolved my problem.

Original comment by zk.Talen...@gmail.com on 3 Nov 2012 at 4:54

GoogleCodeExporter commented 9 years ago
closing this bug

Original comment by vikaas.a...@gmail.com on 3 Apr 2013 at 6:52

GoogleCodeExporter commented 9 years ago

Original comment by vikaas.a...@gmail.com on 3 Apr 2013 at 6:53