jypark pushed a commit to branch master.
commit ebf0cd6728be9b8cd70d8365fe441f8822397098
Author: Jiyoun Park <[email protected]>
Date: Wed Jun 5 15:26:09 2013 +0900
Evas: fix gif cannot decode alpha value correctly.
---
ChangeLog | 4 +++
NEWS | 2 ++
src/modules/evas/loaders/gif/evas_image_load_gif.c | 32 ++++++++++++++++------
3 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0921699..948b2b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-06-05 Jiyou Park
+
+ * Evas: Fix gif cannot decode alpha value correctly.
+
2013-06-04 Jean-Philippe Andre
* Evas: improve stability of Evas_Cserve2.
diff --git a/NEWS b/NEWS
index d6af31d..2229803 100644
--- a/NEWS
+++ b/NEWS
@@ -327,3 +327,5 @@ Fixes:
* Fix eeze sensors to not segv on shutdown
* Evas: correctly detect if a loader support asynchronous preloading.
* Evas: improve stability of Evas_Cserve2.
+ * Evas: Fix gif cannot decode alpha value correctly.
+
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 40c2aa8..e3de8a5 100644
--- a/src/modules/evas/loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c
@@ -451,10 +451,17 @@ _evas_image_load_frame_image_data(Eina_File *f,
}
else
{
- r = cmap->Colors[rows[i1][j1 *
scale_ratio]].Red;
- g = cmap->Colors[rows[i1][j1 *
scale_ratio]].Green;
- b = cmap->Colors[rows[i1][j1 *
scale_ratio]].Blue;
- *ptr++ = ARGB_JOIN(0xff, r, g, b);
+ if (rows[i][j * scale_ratio] == alpha)
+ {
+ ptr++ ;
+ }
+ else
+ {
+ r = cmap->Colors[rows[i1][j1 *
scale_ratio]].Red;
+ g = cmap->Colors[rows[i1][j1 *
scale_ratio]].Green;
+ b = cmap->Colors[rows[i1][j1 *
scale_ratio]].Blue;
+ *ptr++ = ARGB_JOIN(0xff, r, g, b);
+ }
}
}
}
@@ -488,10 +495,17 @@ _evas_image_load_frame_image_data(Eina_File *f,
}
else
{
- r = cmap->Colors[rows[i1][j1 *
scale_ratio]].Red;
- g = cmap->Colors[rows[i1][j1 *
scale_ratio]].Green;
- b = cmap->Colors[rows[i1][j1 *
scale_ratio]].Blue;
- *ptr++ = ARGB_JOIN(0xff, r, g, b);
+ if (rows[i][j * scale_ratio] == alpha)
+ {
+ ptr++ ;
+ }
+ else
+ {
+ r = cmap->Colors[rows[i1][j1 *
scale_ratio]].Red;
+ g = cmap->Colors[rows[i1][j1 *
scale_ratio]].Green;
+ b = cmap->Colors[rows[i1][j1 *
scale_ratio]].Blue;
+ *ptr++ = ARGB_JOIN(0xff, r, g, b);
+ }
}
}
}
@@ -538,7 +552,7 @@ _evas_image_load_frame_image_data(Eina_File *f,
}
else
{
- if (rows[i1][j1] == alpha)
+ if (rows[i1][j1 * scale_ratio] == alpha)
{
ptr++;
}
--
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j