PruitIgoe
PruitIgoe

Reputation: 6384

Objective-c undeclared identifier for CGImageDestinationRef

I have CoreGraphics, QuartzCore and AssetsLibrary frameworks imported. Why would I be getting an undeclared identifier error for CGImageDestinationRef?

Here is how I am declaring it:

 CGImageDestinationRef imageDestinationRef = CGImageDestinationCreateWithURL((__bridge CFURLRef)directoryURL, kUTTypeJPEG, 1, NULL);

Upvotes: 0

Views: 1774

Answers (1)

Gabriele Petronella
Gabriele Petronella

Reputation: 108169

Because its defined in the ImageIO framework. Link and import it and you'll be fine.

Also the kUTTTypeJPEG constant is defined in the MobileCoreServices framework, so you will need that too.

Upvotes: 8

Related Questions