Skip to content
This repository has been archived by the owner on Feb 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #169 from gsempe/image-fix-orientation
Browse files Browse the repository at this point in the history
Keep original image orientation when it is cropped
  • Loading branch information
soffes committed Mar 6, 2013
2 parents cd5a7bf + a492fe0 commit 6bd46fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SSToolkit/UIImage+SSToolkitAdditions.m
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6bd46fc

Please sign in to comment.