diff options
author | Jiyoun Park <jy0703.park@samsung.com> | 2013-04-14 20:49:45 +0900 |
---|---|---|
committer | Jiyoun Park <jy0703.park@samsung.com> | 2013-04-14 20:49:45 +0900 |
commit | 5ba104b46e2e0f2e3f47e924d75799907cb73ab3 (patch) | |
tree | bf8524af3a547c2923cd1286bce10a6592f4fd31 /src | |
parent | b851e10cafa9c032b22a7460f2cd4182d314b61c (diff) | |
download | efl-5ba104b46e2e0f2e3f47e924d75799907cb73ab3.tar.gz |
* Evas: fix gif decoding bug related with background color.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/evas/loaders/gif/evas_image_load_gif.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/modules/evas/loaders/gif/evas_image_load_gif.c b/src/modules/evas/loaders/gif/evas_image_load_gif.c index b39bd90522..6a53e219e8 100644 --- a/src/modules/evas/loaders/gif/evas_image_load_gif.c +++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c @@ -36,6 +36,7 @@ struct _Gif_Frame int delay; int input; } frame_info; + int bg_val; }; static Eina_Bool evas_image_load_file_data_gif_internal(Image_Entry *ie, Image_Entry_Frame *frame, int *error); @@ -349,12 +350,6 @@ _evas_image_load_frame_image_data(Image_Entry *ie, GifFileType *gif, Image_Entry return EINA_FALSE; } - /* get the background value */ - r = cmap->Colors[bg].Red; - g = cmap->Colors[bg].Green; - b = cmap->Colors[bg].Blue; - bg_val = ARGB_JOIN(0xff, r, g, b); - per_inc = 100.0 / (((double)w) * h); per = 0.0; cur_h = scale_h; @@ -401,6 +396,8 @@ _evas_image_load_frame_image_data(Image_Entry *ie, GifFileType *gif, Image_Entry { gif_frame2 = (Gif_Frame *)(new_frame->info); disposal = gif_frame2->frame_info.disposal; + gif_frame->bg_val = gif_frame2->bg_val; + bg_val = gif_frame->bg_val; } switch(disposal) /* we only support disposal flag 0,1,2 */ { @@ -509,6 +506,13 @@ _evas_image_load_frame_image_data(Image_Entry *ie, GifFileType *gif, Image_Entry } else /* first frame decoding */ { + /* get the background value */ + r = cmap->Colors[bg].Red; + g = cmap->Colors[bg].Green; + b = cmap->Colors[bg].Blue; + bg_val = ARGB_JOIN(0xff, r, g, b); + gif_frame->bg_val = bg_val; + memset(ptr, 0, siz); /* fill background color */ |