[FFmpeg-devel] [PATCH]Animated gif transparency
Don Moir
donmoir at comcast.net
Thu Dec 27 22:59:08 CET 2012
> On 12/27/12, Don Moir <donmoir at comcast.net> wrote:
>>
>> ----- 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:
>>
>
> Sorry. Do you have sample that actually breaks with this?
I don't have a file that breaks because of testing background_color_index vs transparent_color_index.
Its just luck I think though. It's valid for the background_color_index and the transparent_color_index to both be >= zero or any
combination of. I have several files like these but then they don't have the GCE_DISPOSAL_BACKGROUND dispose method.
So in order for a file to fail using background_color_index instead of transparent_color_index it would have to have
background_color_index >= zero and use the GCE_DISPOSAL_BACKGROUND dispose method.
A lot of times the background_color_index is the same as the transparent_color_index but not always. There are no rules that say
some combination can't occur and thats up to the encoder of the file.
The valid test is for s->transparent_color_index >= 0
More information about the ffmpeg-devel
mailing list