iPhone 4以降で撮影したObjective-Cの画像をダウンスケールして、できるだけ早くサーバーに送信できるようにしようとしています。現在、フルサイズの画像は古くなっています。
私が試しているダウンサイジングの現在は次のとおりです。
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);
これにより、320x460の画像が得られます。必要なサイズの484x888を取得するにはどうすればよいですか。