2


    I am working with IKImageView. I have a filepath URL which I am using to add an image to my IKImageView. I have tried with 2 ways :
1. - (void)setImage: (CGImageRef)image imageProperties: (NSDictionary *)metaData;
I am passing a CGImageRef which I get from
CGImageRef image =CGImageSourceCreateImageAtIndex(CGImageSourceCreateWithURL((CFURLRef)fileURL, NULL), 0, NULL);
and for metaData :

NSDictionary *image_metadata = (NSDictionary *)CGImageSourceCopyPropertiesAtIndex(imageSource,0,(CFDictionaryRef)[NSDictionary dictionaryWithObjectsAndKeys:
                             [NSNumber numberWithBool:NO], (NSString *)kCGImageSourceShouldCache,
                             nil]) 
[preview_ImageView setImage:image imageProperties: image_metadata];


2. - (void)setImageWithURL: (NSURL *)url;

 [preview_ImageView setImageWithURL:fileURL];

I traced the logs fileURL, image_metadata, image , while they all return values. Also to add i have connected IKImageView to my FileOwner , added QuartzCore, Quartz and ImageIO Frameworks. My Xcode version is 4.5.2 on MacOSX 10.8 . Dont know where I am going wrong?

Vacca
  • 1,219
  • 16
  • 26

0 Answers0