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