I'm trying to downscale an image in Objective-C taken with the iPhone 4 and above so I can send it to the server as quickly as possible. At the moment the image at full size is taking ages.
The current of downsizing I am trying is:
CGSize imageSize;
imageSize = CGSizeMake(484, 888);
UIImage *img = [UIImage imageWithContentsOfFile:path];
UIGraphicsBeginImageContext( imageSize );
[img drawInRect:CGRectMake(0,0,imageSize.width,imageSize.height)];
UIImage* realfrontImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData *frontImageData = UIImageJPEGRepresentation(realfrontImage, 1.0);
This gives me an image of 320x460 how do I get it the size I wanted 484x888.