I've seen this question asked dozens of times but never answered.
How do you resize a UIImage (specifically one returned from the UIImagePickerController camera). When I try any of the methods that are out there I get a memory spike between 20 and 40MB. It does go away but I know that on some hardware this is completely unacceptable.
I've tried the methods that use the following operations: drawInRect:, CGContextDrawImage(), imageWithCGImage:scale:orientation:
I understand that uncompressed images living in memory take up more space than on disk, but it seems like the most common UIImage resize operations involve creating copies of the image data.
Even Apple recommends immediately resizing a picture taken with the camera. However (b/c I believe they know this topic is intensely complex) they offer no words of guidance on how to manage that. Especially how to do it the moment the image data is returned.
Does anyone have a smooth method to resize a large UIImage while conserving memory? I know that's a tall order.