Hi,
I found a bug when using the engine 16 bits and trying to set the
image colorspace if it's different from EVAS_COLORSPACE_565_A5P.
The problem is that when I call evas_object_image_colorspace_get it
uses the engine func colorspace_get to return the current colorspace,
so I tested if it was different from EVAS_COLORSPACE_565_A5P, and if
TRUE I was setting the colorspace to EVAS_COLORSPACE_565_A5P. Then I
was trying to set the data using evas_object_image_data_set and it was
failing with:
Unsupported colorspace 0 in eng_image_new_from_copied_data()
(evas_engine.c:427)
The method evas_object_image_data_set is using o->cur.cspace as the
current colorspace and the evas_object_image_colorspace_get doesn't.
This is inconsistent and it's causing this bug.
The attached patch proper init o->cur.cspace to the engine
colorspace_get and uses it on evas_object_image_colorspace_get.
Ok to commit?
BR
--
Andre Moreira Magalhaes (andrunko)
--------------------------------------------------------
Jabber: [EMAIL PROTECTED]
MSN: [EMAIL PROTECTED]
Skype: andrunko
Blog: http://andrunko.blogspot.com
Index: canvas/evas_object_image.c
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_image.c,v
retrieving revision 1.56
diff -u -r1.56 evas_object_image.c
--- canvas/evas_object_image.c 23 Jul 2007 14:22:56 -0000 1.56
+++ canvas/evas_object_image.c 28 Sep 2007 19:59:42 -0000
@@ -175,6 +175,7 @@
evas_object_image_add(Evas *e)
{
Evas_Object *obj;
+ Evas_Object_Image *o;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
@@ -182,6 +183,9 @@
obj = evas_object_new();
evas_object_image_init(obj);
evas_object_inject(obj, e);
+ o = (Evas_Object_Image *)(obj->object_data);
+ o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output,
+ o->engine_data);
return obj;
}
@@ -1491,8 +1495,7 @@
MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
return EVAS_COLORSPACE_ARGB8888;
MAGIC_CHECK_END();
- return obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output,
- o->engine_data);
+ return o->cur.cspace;
}
/**
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel