2008/10/30 Jose Gonzalez <[EMAIL PROTECTED]>
>
> > This last mail that request users to do power-of-2 on their side is as
> > bad as you say it's to create a temporary canvas, it requires too much
> > knowledge on user size, in this case require user to know about JPEG
> > properties.
> >
> >
>
>   No, no. Quite the opposite. It's the current situation that demands people
> do this. What I'm saying is that the jpg loader should do this itself, ie.
> respect image size load-opts and implement it so that it does this.
>

In enna, I load directory of  jpeg pictures. These pictures are
swallow in edje group and each edje group are added in a box smart
object.
For example this pictures are 3648x2736.
Here is my code to load one picture :

o_edje = edje_object_add(e);
edje_object_file_set(o_edje, enna_config_theme_get(), "enna/picture/item");

o_pict = evas_object_image_add(e);
evas_object_image_file_set(o_pict, filename, NULL);
evas_object_image_size_get(o_pict, &w, &h);

ratio = (float)w / float(h);
oh = 200;
ow = oh * ratio;

evas_object_image_load_size_set(o_pict, ow, oh);
evas_object_resize(o_pict, ow, oh);

evas_object_image_preload(o_pict, 0);

edje_extern_object_min_size_set(o_edje, ow, oh);
edje_extern_object_aspect_set(o_edje, EDJE_ASPECT_CONTROL_BOTH, ratio, ratio);
edje_object_part_swallow(o_edje, "enna.swallow.picture", o_pict);
evas_object_show(o_pict);

It seems that pictures are load and display faster if i use the
evas_object_image_load_size_set api and the preload. But if I
understand this thread, I should have better results if I use power of
two dimensions for the load options, and after that resize image
object to the dimension I need (here w = 200 and h = w * ratio) ?

--
Nicolas Aguirre
Mail: [EMAIL PROTECTED]
Web: http://www.digital-corner.org

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to