* Evas: fix gif decoding bug related with background color.

This commit is contained in:
Jiyoun Park 2013-04-14 20:49:45 +09:00
parent b851e10caf
commit 5ba104b46e
3 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2013-04-14 Jiyoun Park
* Evas: fix gif decoding bug related with background color.
2013-04-14 ChunEon Park
* Evas: Don't update evas update area by the clipper if the image obj visible is changed.

1
NEWS
View File

@ -240,4 +240,5 @@ Fixes:
* Edje entry: When cursor is located to each edge, entry now doesn't grab events for cursor movement.
* Evas map: don't be crashed even if image size is 0.
* Evas: Don't update evas update area by the clipper if the image obj visible is changed.
* Evas: fix gif decoding bug related with background color.

View File

@ -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 */