title: Inaccurate NSData size given in bytes
body: <p>I took a 13.3MB image and added it to XCode. I'm aware that when compiling, XCode performs some tricks to bring down the file size. I did this, to test how big the image now was, after being converted into data:</p>
  
  <pre><code>UIImage *image = [UIImage imageNamed:@"image.jpg"];
  NSData *data = UIImageJPEGRepresentation(image, 1.0);
  NSLog(@"length: %i", data.length);
  </code></pre>
  
  <p>The length I got back was <code>26758066</code>. If that's in bytes, then it reads to me as 26.7MB. How is the image so big suddenly? Is there another way for me to get the image in data form without going through UIImage first?</p>
  
  <p>EDIT: Further testing reveals that this works, and brings out a data length of ~13.3MB - the expected amount:</p>
  
  <pre><code>NSString *filePath = [[NSBundle mainBundle] pathForResource:@"image" ofType:@"jpg"];
  NSData *data = [NSData dataWithContentsOfFile:filePath];
  NSLog(@"length: %i", data.length);
  </code></pre>