From a43c9eb31bb795bc8fb87053965f7aba6e6a383b Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Sat, 11 Aug 2012 20:38:06 +0000 Subject: [PATCH] Yet another fix for GIF loading of animations. Fixes case when Backcolor is different from Transparent color, such as this image http://i49.tinypic.com/35j08j4.gif (WIP by Hapiel) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1987 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/fileformats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fileformats.c b/src/fileformats.c index 9ba6bb39..ac81906e 100644 --- a/src/fileformats.c +++ b/src/fileformats.c @@ -2210,13 +2210,13 @@ void Load_GIF(T_IO_Context * context) } else { - Fill_canvas(context, LSDB.Backcol); + Fill_canvas(context, is_transparent ? context->Transparent_color : LSDB.Backcol); } } else { // First frame/layer, fill canvas with backcolor - Fill_canvas(context, LSDB.Backcol); + Fill_canvas(context, is_transparent ? context->Transparent_color : LSDB.Backcol); } // Duration was set in the previously loaded GCE Set_frame_duration(context, last_delay*10); @@ -2266,7 +2266,7 @@ void Load_GIF(T_IO_Context * context) memset( Main_backups->Pages->Image[Main_current_layer].Pixels + (previous_pos_y+y)* Main_backups->Pages->Width+previous_pos_x, - LSDB.Backcol, + is_transparent ? context->Transparent_color : LSDB.Backcol, previous_width); } }