title: Crop and save visible region of UIImageView using AspectFill
body: <p>I have a fullscreen UIImageView with a image in it set to AspectFill (full bleed), how can I save only the visible portion of the image when its using the Aspect Fill content mode?</p>
  
  <pre><code>CGRect visibleRect;   
  visibleRect.size= mImageView.frame.size;
  CGImageRef cropped_img = CGImageCreateWithImageInRect(mImageView.image.CGImage, visibleRect);
  UIImage *finalImage = [[UIImage alloc]initWithCGImage:cropped_img];
  UIImageWriteToSavedPhotosAlbum(finalImage, nil, nil, nil);
  </code></pre>
  
  <p>This is my current code, cropping and saving works, its just not cropping correctly. Any ideas?</p>