diff --git a/FastttCamera/UIImage+FastttCamera.m b/FastttCamera/UIImage+FastttCamera.m index 914582e..10c27a3 100644 --- a/FastttCamera/UIImage+FastttCamera.m +++ b/FastttCamera/UIImage+FastttCamera.m @@ -190,11 +190,10 @@ - (UIImage *)fastttImageWithNormalizedOrientation FastttRound(self.size.width), FastttRound(self.size.height)); - UIGraphicsBeginImageContextWithOptions(newRect.size, YES, self.scale); - [self drawInRect:newRect]; + CGImageRef imageRef = CGImageRetain(CGImageCreateWithImageInRect([self CGImage], newRect)); - UIImage *normalized = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); + UIImage *normalized = [UIImage imageWithCGImage:imageRef]; + CGImageRelease(imageRef); return normalized; }