Skip to content

Commit

Permalink
Update UIImage+CropScaleOrientation.m
Browse files Browse the repository at this point in the history
Includes the pull request apache#238 from the main fork
  • Loading branch information
Tilexou authored Nov 6, 2018
1 parent 0213690 commit 3486de8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ios/UIImage+CropScaleOrientation.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ - (UIImage*)imageByScalingAndCroppingForSize:(CGSize)targetSize
CGSize imageSize = sourceImage.size;
CGFloat width = imageSize.width;
CGFloat height = imageSize.height;
CGFloat targetWidth = targetSize.width;
CGFloat targetHeight = targetSize.height;
CGFloat targetWidth = MIN(targetSize.width, width);
CGFloat targetHeight = MIN(targetSize.height, height);
CGFloat scaleFactor = 0.0;
CGFloat scaledWidth = targetWidth;
CGFloat scaledHeight = targetHeight;
Expand Down Expand Up @@ -136,8 +136,8 @@ - (UIImage*)imageByScalingNotCroppingForSize:(CGSize)targetSize
CGSize imageSize = sourceImage.size;
CGFloat width = imageSize.width;
CGFloat height = imageSize.height;
CGFloat targetWidth = targetSize.width;
CGFloat targetHeight = targetSize.height;
CGFloat targetWidth = MIN(targetSize.width, width);
CGFloat targetHeight = MIN(targetSize.height, height);
CGFloat scaleFactor = 0.0;
CGSize scaledSize = targetSize;

Expand Down

0 comments on commit 3486de8

Please sign in to comment.