changeset 4018:9c8ab288ebf6 libavcodec

Make PNG produce correct 8-bit pictures
author kostya
date Sat, 14 Oct 2006 12:23:54 +0000
parents b1a1fb651bf5
children 6d4ac21853d7
files png.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/png.c	Sat Oct 14 05:01:05 2006 +0000
+++ b/png.c	Sat Oct 14 12:23:54 2006 +0000
@@ -850,7 +850,7 @@
         for(i = 0; i < 256; i++) {
             v = palette[i];
             alpha = v >> 24;
-            if (alpha != 0xff)
+            if (alpha && alpha != 0xff)
                 has_alpha = 1;
             *alpha_ptr++ = alpha;
             ptr[0] = v >> 16;