Skip to content

Commit

Permalink
Merge pull request AFNetworking#6 from bdmac/master
Browse files Browse the repository at this point in the history
imageByScalingAndCroppingImage Orientation Ratio Bug
  • Loading branch information
Mattt Thompson committed Aug 4, 2011
2 parents 9e107d6 + bee6a5d commit ffe7b9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AFNetworking/UIImage+AFNetworking.m
Expand Up @@ -38,7 +38,7 @@ + (UIImage *)imageByScalingAndCroppingImage:(UIImage *)image size:(CGSize)size {
CGFloat heightFactor = size.height / image.size.height;
CGFloat scaleFactor = (widthFactor > heightFactor) ? widthFactor : heightFactor;
scaledSize.width = image.size.width * scaleFactor;
scaledSize.width = image.size.height * scaleFactor;
scaledSize.height = image.size.height * scaleFactor;
if (widthFactor > heightFactor) {
thumbnailPoint.y = (size.height - scaledSize.height) * 0.5;
} else if (widthFactor < heightFactor) {
Expand Down

0 comments on commit ffe7b9b

Please sign in to comment.