Hello,

I use Elm slideshow in my application and I try to load a big image. I just
need to dispalay the full image (no zoom ...)

I try to use photocam but I have 2 problems with it :
- the animation when the image is fit. This animation is in a visual
conflict with the slideshow which has his own animation
- an object is not a member of the photocam object and stay at the top when
photocam is swallowed. I did not find what object was responsible.

Next I try to use my photo object and add some optimization:

When I set a image file I retrieve his size with (this method does not
downlad the image ?):
   evas_object_image_file_set(o, NULL, NULL);
   evas_object_image_load_scale_down_set(o, 0);
   evas_object_image_file_set(o, image, photo_group);
   evas_object_image_size_get(o, &iw, &ih);

Then I use evas_object_image_load_scale_down_set() and preload with:

   evas_object_image_preload(o, 1);
   evas_object_image_file_set(o, NULL, NULL);
   evas_object_image_load_scale_down_set(o, sd->zoom);
   evas_object_image_file_set(o, sd->photo_file, sd->photo_group);
   evas_object_image_preload(o, 0);

The preload seems not working :/ The application freeze during a time.
Preload load the file in a thread right ?

I am not sure about what evas_object_image_load_scale_down_set() does. I
think it is a way to not load all the image but only certains pixels.
Usefull if the image dispalyed is smaller than the real size. I use this
code to calculate the zoom :

    int zoomw = 1, zoomh = 1;
    while(w_img/2>w)
     {
     w_img = w_img/2;
     zoomw++;
     }
   while(h_img/2>h)
     {
     h_img = h_img/2;
     zoomh++;
     }
   sd->zoom = (zoomw<zoomh?zoomw:zoomh);

The conclusion is that photocam load the image 3 times faster than me :)

-- 
Regards.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to