6

I'm developing an application using coreImage framework.I created a CIImage from UIImage.

CIImage *image = [CIImage imageWithCGImage:self.canvasImage.CGImage];

here self.canvasImage is a UIImage,I debug it and object image is being created by compiler with some memory.

i'm creating a NSDictionary object returned by properties method using following code.

NSDictionary *opts  =[image properties] ;

here my opts object is being assign with nil value.

i searched it but didn't found the solution,why properties method is returning nil value?

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
shabista JD
  • 115
  • 7

1 Answers1

5

I was having this same problem. Turns out the properties dictionary is only non nil if you use the imageWithData: or imageWithContentsOfURL: to create the CIImage.

It's not documented well at all. Check out WWDC 2013 session 509.

farhad
  • 51
  • 1
  • 2