title: Resizing Images Objective-C
body: <p>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. </p>
  
  <p>The current of downsizing I am trying is:</p>
  
  <pre><code>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);
  </code></pre>
  
  <p>This gives me an image of 320x460 how do I get it the size I wanted 484x888.</p>