Permalink
Browse files

In cropToSize when image orientation is taken into account, width and…

… height should be also switched places
  • Loading branch information...
jkrzemie committed May 12, 2015
1 parent 1c0e053 commit 3bb67b06b535ebd96ad2ebfc934b4f7d84110b9b
Showing with 4 additions and 0 deletions.
  1. +4 −0 Categories/UIImage+Resizing.m
@@ -64,6 +64,10 @@ -(UIImage*)cropToSize:(CGSize)newSize usingMode:(NYXCropMode)cropMode
CGFloat temp = x;
x = y;
y = temp;
temp = newSize.width;
newSize.width = newSize.height;
newSize.height = temp;
}
CGRect cropRect = CGRectMake(x * self.scale, y * self.scale, newSize.width * self.scale, newSize.height * self.scale);

0 comments on commit 3bb67b0

Please sign in to comment.