mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-28 18:32:50 +00:00
Fix loading of GIF files with transparent background color (without global palette).
This commit is contained in:
parent
68a8907ffc
commit
8b6b51bec2
@ -118,7 +118,13 @@ static bool load_GIF(FileOp *fop)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sprite->getFolder()->add_layer(layer);
|
sprite->getFolder()->add_layer(layer);
|
||||||
|
|
||||||
|
// If the GIF image has a global palette (colors_count > 0), it has
|
||||||
|
// a valid background_index color.
|
||||||
|
if (gif->palette.colors_count > 0)
|
||||||
layer->configureAsBackground();
|
layer->configureAsBackground();
|
||||||
|
else
|
||||||
|
gif->background_index = 0;
|
||||||
|
|
||||||
image_clear(current_image, gif->background_index);
|
image_clear(current_image, gif->background_index);
|
||||||
image_clear(current_image_old, gif->background_index);
|
image_clear(current_image_old, gif->background_index);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user