Permalink
Browse files

Keep original image orientation when it is cropped

  • Loading branch information...
1 parent 6260a59 commit a492fe0bb30b3c1fb47637bd659dfcb5d21c70e1 gsempe committed with gsempe Mar 6, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 SSToolkit/UIImage+SSToolkitAdditions.m
@@ -28,7 +28,7 @@ - (UIImage *)imageCroppedToRect:(CGRect)rect {
rect = CGRectMake(rect.origin.x * scale, rect.origin.y * scale, rect.size.width * scale, rect.size.height * scale);
CGImageRef imageRef = CGImageCreateWithImageInRect(self.CGImage, rect);
- UIImage *cropped = [UIImage imageWithCGImage:imageRef];
+ UIImage *cropped = [UIImage imageWithCGImage:imageRef scale:scale orientation:self.imageOrientation];
CGImageRelease(imageRef);
return cropped;
}

0 comments on commit a492fe0

Please sign in to comment.