I’m resizing an UIImage using the MGImageUtilities library (using the imageScaledToFitSize method). After the resize, if I print the size of the new UIImage created, the size is as expected.
After this first operation, I send the compressed image (UIImageJPEGRepresentation(scaledImage, 0.7)) to a web service using the ASIHTTP lib.
With an iPad, the image is stored on the server with the expected size. When I run the same code on an iPod (4gen) the image is stored bigger than it’s original version… Do you have any hint for me?
The MGImageUtilities is resizing the UIImage with a twist, it apply the retina display DPI to the image. Instead of 72pixel/inch, it apply 144p/i. So I searched on the net for a better lib and I think I found something really useful: http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/