We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e22e0b8 commit ba54647Copy full SHA for ba54647
FastttCamera/UIImage+FastttCamera.m
@@ -190,11 +190,11 @@ - (UIImage *)fastttImageWithNormalizedOrientation
190
FastttRound(self.size.width),
191
FastttRound(self.size.height));
192
193
+ CGImageRef imageRef = CGImageRetain(CGImageCreateWithImageInRect([self CGImage], newRect));
194
UIGraphicsBeginImageContextWithOptions(newRect.size, YES, self.scale);
- [self drawInRect:newRect];
195
196
- UIImage *normalized = UIGraphicsGetImageFromCurrentImageContext();
197
- UIGraphicsEndImageContext();
+ UIImage *normalized = [UIImage imageWithCGImage:imageRef];
+ CGImageRelease(imageRef);
198
199
return normalized;
200
}
0 commit comments