[Ffmpeg-devel] [PATCH] Correct 8-bit PNG output
Kostya
kostya.shishkov
Sat Oct 14 07:08:40 CEST 2006
Here is trivial patch which makes FFmpeg output correct PNGs from
palettized codecs. For now produced images are 100% transparent.
-------------- next part --------------
Index: png.c
===================================================================
--- png.c (revision 6681)
+++ png.c (working copy)
@@ -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;
More information about the ffmpeg-devel
mailing list