[FFmpeg-devel] [PATCH]Animated gif transparency
Don Moir
donmoir at comcast.net
Thu Dec 27 20:32:34 CET 2012
----- Original Message -----
From: "Paul B Mahol" <onemda at gmail.com>
To: "FFmpeg development discussions and patches" <ffmpeg-devel at ffmpeg.org>
Sent: Thursday, December 27, 2012 1:16 PM
Subject: Re: [FFmpeg-devel] [PATCH]Animated gif transparency
> On 12/27/12, Don Moir <donmoir at comcast.net> wrote:
>> Attached fixes remaining issue where transparent background is wrong for
>> some gifs.
>>
>> example problem file:
>>
>> http://sms.pangolin.com/temp/transparent_background_wrong.gif
>>
>> Without the patch, it will show a gray background instead of a transparent
>> background for above file.
>
> Applied, thanks.
I see in the patch that you applied you have this:
if (s->gce_disposal == GCE_DISPOSAL_BACKGROUND) {
- if (s->background_color_index == s->transparent_color_index)
//********************
+ if (s->background_color_index >= 0) // wrong
//********************
s->stored_bg_color = s->trans_color;
else
s->stored_bg_color = s->bg_color;
You did the test on background_color_index instead of transparent_color_index :
if (s->gce_disposal == GCE_DISPOSAL_BACKGROUND) {
- if (s->background_color_index == s->transparent_color_index)
//********************
+ if (s->transparent_color_index >= 0) // correct
//********************
s->stored_bg_color = s->trans_color;
else
s->stored_bg_color = s->bg_color;
More information about the ffmpeg-devel
mailing list