How to get smaller square size image picked from UIImagePickerController
Hi
I am trying to get a thumb image that is croped to a 64X64 rectangle usinng UIImagePickerController. What I need is something like thumb square image available in UIImagePickerController photo libraries. Could anyone give some method or hints on how to achieve this ?
But will this make image disordered or something. I mean width and height may different in an image I might be picking. So how does iPhone Photos application make thumbnails ?
But will this make image disordered or something. I mean width and height may different in an image I might be picking. So how does iPhone Photos application make thumbnails ?
Thanks
Also, does this, or is there a way to reduce the image file size? I get an image from the library and if its too big it taeks awhile for the ImageView to display it.
Also, does this, or is there a way to reduce the image file size? I get an image from the library and if its too big it taeks awhile for the ImageView to display it.
Thanks!!
The code listed above will also fail if the image was taken with the phone in any orientation other than landscape left. You need to (possibly) rotate the image, then resize it proportionally. You can then stick it in a square imageview and cut off the sides as needed. You can create a square imageview, set it's contentMode to UIViewContentModeScaleAspectFill and clipsToBounds to YES.