What framework needs to be imported to use CGImage?
So I have an app that gets pixel data from a picture and then manipulates to change brightness levels via R开发者_StackOverflowGB values of each pixel.
I have these lines of code to convert a UIImage
to a CGImage
:
CGDataProviderRef dataProvider = CGImageGetDataProvider(mycgImage);
CFDataRef imageData = CGDataProviderCopyData(dataProvider);
void *pixels = CFDataGetBytePtr(imageData);
I keep getting an error of
"_CGImageGetDataProvder", referenced from: (blah blah blah)
and
"_CGDataProviderCopyData", referenced from: (blah blah blah)
Can anyone tell me how to fix these errors? I've tried googling them, but to no avail. I think it has to do with me not importing something. Anyone got any help for me?
You may need to import the CoreGraphics framework, and/or the QuartzCore framework. Right click on the Frameworks group and do "Add Existing Framework".
精彩评论