title: iphone 4s - UIImage CGImage image dimensions
body: <p>I have a crash which only occurs on 4S (not on 3GS). I am doubting its because of @2x. Basically I get raw bytes of image and manipulate. Here's the question I have.</p>
  
  <p>I load a image as mentioned in the sample code below. At the end, uiWidth should be 2000 and cgwidth should be 2000. Correct? (Would it still be true if image is loaded from camera rolls? Or its autoscaling and uiWidth will be 4000?)</p>
  
  <pre><code>//test.jpg is 2000x 1500 pixels.
  NSString *fileName = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"jpg"];
  UIImage *image = [UIImage imageWithContentsOfFile:fileName];
  
  int uiWidth = image.size.width;
  
  CGImageRef cgimg = image.CGImage;
  
  int cgWidth = CGImageGetWidth(cgimg);
  </code></pre>
  
  <p>Thank you for your help.</p>