mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
Make gif transparent color to be transparent black
Change it from transparent white to transparent black, which matches the transparent color assumed in Webp dispose-to-background method. Also pre-multiply background colors before comparison in anim_diff, just as what is done with regular pixel values. Change-Id: I5a790522df21619c666ce499f73e42294ed276f2
This commit is contained in:
@ -396,7 +396,7 @@ static uint32_t GetBackgroundColorGIF(GifFileType* gif) {
|
||||
const ColorMapObject* const color_map = gif->SColorMap;
|
||||
if (transparent_index != NO_TRANSPARENT_COLOR &&
|
||||
gif->SBackGroundColor == transparent_index) {
|
||||
return 0x00ffffff; // Special case: transparent white.
|
||||
return 0x00000000; // Special case: transparent black.
|
||||
} else if (color_map == NULL || color_map->Colors == NULL
|
||||
|| gif->SBackGroundColor >= color_map->ColorCount) {
|
||||
return 0xffffffff; // Invalid: assume white.
|
||||
|
Reference in New Issue
Block a user