UIImagePickerController shows image slowly

I have an application based on UIImagePickerController, everything works fine except, When I try to open panoramic images (<220 degrees POV), the imagepicker controller takes a long time to open and display the image. I know how panoramic images can be quite huge, both for their resolution, and that I can scale them when they load depending on their ratio.

But the problem is, because of its original size, it takes a long time to load the image from the gallery, How can I optimize this?

+3


source to share


1 answer


You need to keep all images and reduce the size and then fill it



NSData *imageData = UIImageJPEGRepresentation(your_image, your_reduced_scale (0.0 -> 1.0) );
UIImage *img = [UIImage imageWithData:imageData];

      

0


source







All Articles