Updated to Xcode 7 and getting this (warning?) message while an image was being rendered in an operation:
CreateWrappedSurface() failed for a dataprovider-backed CGImageRef.
There was no message like this under Xcode 6.4.
Got which code part threw the message:
if (!self.originalImage) // @property (nonatomic, strong) UIImage *originalImage;
return;
CGImageRef originalCGImage = self.originalImage.CGImage;
NSAssert(originalCGImage, @"Cannot get CGImage from original image");
CIImage *inputCoreImage = [CIImage imageWithCGImage:originalCGImage]; // this results the console message
I replaced my CIIImage creator to get it directly from the UIImage:
CIImage *originalCIImage = self.originalImage.CIImage;
NSAssert(originalCIImage, @"Cannot build CIImage from original image");
In this case I didn't get any console message, but had an assert: originalCIImage was nil.
The class reference of UIImage says:
@property(nonatomic, readonly) CIImage *CIImage
If the UIImage object was initialized using a CGImageRef, the value of the property is nil.
So I'm using the original code as fallback:
CIImage *originalCIImage = self.originalImage.CIImage;
if (!originalCIImage) {
CGImageRef originalCGImageRef = self.originalImage.CGImage;
NSAssert(originalCGImageRef, @"Unable to get CGimageRef of originalImage");
originalCIImage = [CIImage imageWithCGImage:originalCGImageRef];
}
NSAssert(originalCIImage, @"Cannot build CIImage from original image");
The problem is, I'm still getting the warning messages in console.
Has anybody got this message before? What's the solution to nuke that warning(?) message?
Thanks, Adam