[FFmpeg-devel] [PATCH]Animated gif transparency - second attempt to patch

Don Moir donmoir at comcast.net
Sun Dec 30 17:54:57 CET 2012

On the first go around, Paul had modified the patch I submitted to use background_color_index instead of the 

This is incorrect since the background_color_index has nothing to do with transparency

So looking at the following code:

         if (s->gce_disposal == GCE_DISPOSAL_BACKGROUND) {
-            if (s->background_color_index >= 0)
+            if (s->transparent_color_index >= 0)
                 s->stored_bg_color = s->trans_color;
                 s->stored_bg_color = s->bg_color;

This sample has a background_color_index >= 0 but has no transparency. So if you test for background_color_index >= 0, it will be 
wrong. The correct behavior is to test for transparent_color_index >= 0.


If you display this in a browser chances are it will be shown incorrectly.

As the star rotates, the background color should be gold and not transparent or black. IE and FireFox show it as transparent. Opera 
showed it as a black background. The other 3rd partly programs I used showed it correctly with gold background.

Shown here correctly as star rotates:


Please re-apply 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gifdec.diff
Type: application/octet-stream
Size: 481 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121230/1c078cb1/attachment.obj>

More information about the ffmpeg-devel mailing list