xmubingo / webp

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

Alpha channel data incorrect #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
YUV420toRGBA() creates a RGBA bitmap with the alpha channel set to 0x00.  If 
the alpha channel is respected, the image is wholly transparent.

What is the expected output? What do you see instead?
Expected an RGBA image, get nothing visible.

What version of the product are you using? On what operating system?
Initial release of libwebp compiled for AmigaOS 4.1 (PowerPC)

Please provide any additional information below.
The below shows my fix for this issue, to set the alpha channel to 0xff instead 
of 0x00.
Diff against original webpimg.c:

--- Copy_of_webpimg.c   2010-10-02 13:46:53 
+++ webpimg.c   2010-10-02 13:46:39 
@@ -150,7 +150,7 @@ static void ToRGB(int y, int u, int v, u
   const int r = kClip[y + r_off - RGB_RANGE_MIN];
   const int g = kClip[y + g_off - RGB_RANGE_MIN];
   const int b = kClip[y + b_off - RGB_RANGE_MIN];
-  *dst = (r << RED_SHIFT) | (g << GREEN_SHIFT) | (b << BLUE_SHIFT);
+  *dst = (r << RED_SHIFT) | (g << GREEN_SHIFT) | (b << BLUE_SHIFT) | (0xff << 
ALPHA_SHIFT);
 }

 static inline uint32 get_le32(const uint8* const data) {

Original issue reported on code.google.com by cdyoung@gmail.com on 2 Oct 2010 at 12:52

GoogleCodeExporter commented 9 years ago

Original comment by rab...@google.com on 3 Oct 2010 at 3:39

GoogleCodeExporter commented 9 years ago

Original comment by somnath....@gmail.com on 7 Oct 2010 at 4:23

GoogleCodeExporter commented 9 years ago
Issue 19 has been merged into this issue.

Original comment by vikaas.a...@gmail.com on 15 Nov 2010 at 12:24

GoogleCodeExporter commented 9 years ago
webpconv and the original libwebp library are now obsolete.

new binaries are cwebp and dwebp, and libwebp-0.1.2

Original comment by pascal.m...@gmail.com on 6 May 2011 at 2:18