I want to resize a UIImage (height and width) and store it in a NSData with new measures. Example:
[UIImage imageWithCGImage:[image CGImage] scale:compression orientation:UIImageOrientationUp]
This does not preserve the dimensions when converted to NSData. What is the problem?