From d29bbee941f05239cdcbf244a7c8698845d3e667 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Sat, 5 May 2012 16:01:14 +0000 Subject: [PATCH] Fix an error when loading layered image that used a transparent color different from zero ,which resulted in corrupted image. Thanks iLKke! git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1947 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/fileformats.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fileformats.c b/src/fileformats.c index 73b88ddf..e2457793 100644 --- a/src/fileformats.c +++ b/src/fileformats.c @@ -2217,6 +2217,14 @@ void Load_GIF(T_IO_Context * context) Main_backups->Pages->Image[Main_current_layer-1].Pixels, Main_backups->Pages->Width*Main_backups->Pages->Height); } + else + { + if (context->Type == CONTEXT_MAIN_IMAGE) + memset( + Main_backups->Pages->Image[Main_current_layer].Pixels, + LSDB.Backcol, + Main_backups->Pages->Width*Main_backups->Pages->Height); + } } else {