Gustavo wrote: > On Thu, Oct 30, 2008 at 9:51 AM, Nicolas Aguirre > <[EMAIL PROTECTED]> wrote: > >> 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) ? >> > > load size will automatically work to the nearest larger or equal power > of two size. > > as for resize, yes, as raster said you will end with images that are > not w=200, so if you do not resize them later you will do the resize > for every frame in animations and so (evas still does not auto-cache > scale results). > >
I would reply to this myself, but I need to wait 12 hrs. ;) PS. While we're on this topic, let me quickly add some further nonsense regarding "load options" in general. I would actually go as far as to consider letting image borders be considered, and eventually when/if object transforms are done (not image fill-transforms), I'd consider these as well. It might also be useful to look into having these be represented in edje/edc in a comprehensive way.. possibly even applied to edje groups as a whole. ____________________________________________________________ Find the right teaching school to meet your educational needs. Click to learn more. http://thirdpartyoffers.juno.com/TGL2141/fc/Ioyw6i3njBiRzXr1lpJi743NtRu9dPSQgXnrkaBx3sh5bURz5Jt2UE/ ------------------------------------------------------------------------- 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
