[E-devel] Evas loading image fastly
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/2w) { w_img = w_img/2; zoomw++; } while(h_img/2h) { h_img = h_img/2; zoomh++; } sd-zoom = (zoomwzoomh?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
Re: [E-devel] Evas loading image fastly
2009/10/12 Atton Jonathan jonathan.at...@gmail.com: 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); you could use evas_object_image_load_size_set as well. But I have no idea what this function do exactly, I just experienced load speed up when I specify the size of the container. I guess it's only usefull for jpeg images (maybe svg ?) I use this code to calculate the zoom : int zoomw = 1, zoomh = 1; while(w_img/2w) { w_img = w_img/2; zoomw++; } while(h_img/2h) { h_img = h_img/2; zoomh++; } sd-zoom = (zoomwzoomh?zoomw:zoomh); you should maybe use elm_photocam_zoom_mode_set(im, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT) ? The conclusion is that photocam load the image 3 times faster than me :) It's what I was talking about :P -- Nicolas Aguirre Mail: aguirre.nico...@gmail.com Web: http://www.digital-corner.org -- 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
Re: [E-devel] Evas loading image fastly
2009/10/12 Nicolas Aguirre aguirre.nico...@gmail.com 2009/10/12 Atton Jonathan jonathan.at...@gmail.com: 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); you could use evas_object_image_load_size_set as well. But I have no idea what this function do exactly, I just experienced load speed up when I specify the size of the container. I guess it's only usefull for jpeg images (maybe svg ?) I use this code to calculate the zoom : int zoomw = 1, zoomh = 1; while(w_img/2w) { w_img = w_img/2; zoomw++; } while(h_img/2h) { h_img = h_img/2; zoomh++; } sd-zoom = (zoomwzoomh?zoomw:zoomh); you should maybe use elm_photocam_zoom_mode_set(im, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT) ? With a small photo (2500x) I have a animation but not with a big photo (2x) The conclusion is that photocam load the image 3 times faster than me :) It's what I was talking about :P -- Nicolas Aguirre Mail: aguirre.nico...@gmail.com Web: http://www.digital-corner.org -- 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