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
This commit is contained in:
Yves Rizoud 2012-08-11 20:38:06 +00:00
parent de1c8f9a8e
commit a43c9eb31b

View File

@ -2210,13 +2210,13 @@ void Load_GIF(T_IO_Context * context)
} }
else else
{ {
Fill_canvas(context, LSDB.Backcol); Fill_canvas(context, is_transparent ? context->Transparent_color : LSDB.Backcol);
} }
} }
else else
{ {
// First frame/layer, fill canvas with backcolor // 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 // Duration was set in the previously loaded GCE
Set_frame_duration(context, last_delay*10); Set_frame_duration(context, last_delay*10);
@ -2266,7 +2266,7 @@ void Load_GIF(T_IO_Context * context)
memset( memset(
Main_backups->Pages->Image[Main_current_layer].Pixels Main_backups->Pages->Image[Main_current_layer].Pixels
+ (previous_pos_y+y)* Main_backups->Pages->Width+previous_pos_x, + (previous_pos_y+y)* Main_backups->Pages->Width+previous_pos_x,
LSDB.Backcol, is_transparent ? context->Transparent_color : LSDB.Backcol,
previous_width); previous_width);
} }
} }