Permalink
Browse files

Merge pull request #169 from gsempe/image-fix-orientation

Keep original image orientation when it is cropped
  • Loading branch information...
2 parents cd5a7bf + a492fe0 commit 6bd46fce5bf45eeb24cf7ee642200da614f01b96 @soffes committed 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 6bd46fc

Please sign in to comment.