开发者

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".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜