From: jypark Date: Sun, 26 Feb 2012 10:46:56 +0000 (+0000) Subject: fix gif cannot deal with transparent color. X-Git-Tag: submit/trunk/20120815.174732~479 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37d3fae47e77cd8ce3003186b12fe50554e79dc2;p=profile%2Fivi%2Fevas.git fix gif cannot deal with transparent color. when make first frame, it didn't consider alpha value. change code to deal with alpha value git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@68450 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/modules/loaders/gif/evas_image_load_gif.c b/src/modules/loaders/gif/evas_image_load_gif.c index 9cd6f6e..dbb3584 100644 --- a/src/modules/loaders/gif/evas_image_load_gif.c +++ b/src/modules/loaders/gif/evas_image_load_gif.c @@ -483,10 +483,17 @@ _evas_image_load_frame_image_data(Image_Entry *ie, GifFileType *gif, Image_Entry } else { - r = cmap->Colors[rows[i1][j1]].Red; - g = cmap->Colors[rows[i1][j1]].Green; - b = cmap->Colors[rows[i1][j1]].Blue; - *ptr++ = ARGB_JOIN(0xff, r, g, b); + if (rows[i1][j1] == alpha) + { + ptr++ ; + } + else + { + r = cmap->Colors[rows[i1][j1]].Red; + g = cmap->Colors[rows[i1][j1]].Green; + b = cmap->Colors[rows[i1][j1]].Blue; + *ptr++ = ARGB_JOIN(0xff, r, g, b); + } } } }