Remove unnecessary and trouble causing MINs. #3

This commit is contained in:
Andrew Stephan
2014-03-28 00:10:10 -04:00
parent be844522ae
commit 42877933f6
+3 -3
View File
@@ -121,15 +121,15 @@
// opposite comparison to imageByScalingAndCroppingForSize in order to contain the image within the given bounds
if (widthFactor == 0.0) {
scaleFactor = heightFactor;
scaleFactor = heightFactor;
} else if (heightFactor == 0.0) {
scaleFactor = widthFactor;
scaleFactor = widthFactor;
} else if (widthFactor > heightFactor) {
scaleFactor = heightFactor; // scale to fit height
} else {
scaleFactor = widthFactor; // scale to fit width
}
scaledSize = CGSizeMake(MIN(width * scaleFactor, targetWidth), MIN(height * scaleFactor, targetHeight));
scaledSize = CGSizeMake(width * scaleFactor, height * scaleFactor);
}
UIGraphicsBeginImageContext(scaledSize); // this will resize