mirror of
https://github.com/zhigang1992/PINRemoteImage.git
synced 2026-04-10 22:47:26 +08:00
[CIFilter outputImage] can return nil, [CIContext createCGImage:fromRect:] requires a non-nil CIImage as input.
This commit is contained in:
@@ -356,11 +356,15 @@
|
||||
forKey:kCIInputRadiusKey];
|
||||
|
||||
CIImage *outputImage = [self.gaussianFilter outputImage];
|
||||
CGImageRef outputImageRef = [self.processingContext createCGImage:outputImage fromRect:CGRectMake(0, 0, inputImage.size.width, inputImage.size.height)];
|
||||
|
||||
//"decoding" the image here copies it to CPU memory?
|
||||
outputUIImage = [UIImage pin_decodedImageWithCGImageRef:outputImageRef];
|
||||
CGImageRelease(outputImageRef);
|
||||
if (outputImage) {
|
||||
CGImageRef outputImageRef = [self.processingContext createCGImage:outputImage fromRect:CGRectMake(0, 0, inputImage.size.width, inputImage.size.height)];
|
||||
|
||||
if (outputImageRef) {
|
||||
//"decoding" the image here copies it to CPU memory?
|
||||
outputUIImage = [UIImage pin_decodedImageWithCGImageRef:outputImageRef];
|
||||
CGImageRelease(outputImageRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (outputUIImage == nil) {
|
||||
|
||||
Reference in New Issue
Block a user