views:

20

answers:

1

So I have an app that gets pixel data from a picture and then manipulates to change brightness levels via RGB values of each pixel.

I have these lines of code to convert a UImage 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 these errors...but to no avail. I think it has to do with me not importing something. Anyone got any help for me?

A: 

You may need to import the CoreGraphics framework, and/or the QuartzCore framework. Right click on the Frameworks group and do "Add Existing Framework".

quixoto
I imported the QuartzCore framework (but not the CoreGraphics framework). Could not importing both be giving me the error?
mike
Got it to work by importing CoreGraphics! THanks! Best answer to you!
mike