views:

214

answers:

0

Hi, I want to display an image on the display. Input images may be orientated. I can't go with CIImages as the images are raw images and it will take up huge amount of CPU and memory.

So i tried out with the CGImage, With thumbnail creation it works fine, but with image creation it doesn't provide the orientation less image.

   NSDictionary* thumbOpts = [NSDictionary dictionaryWithObjectsAndKeys:
                  (id) kCFBooleanTrue, (id)kCGImageSourceCreateThumbnailWithTransform, nil];

   //This one works fine
   CGImageRef image = CGImageSourceCreateThumbnailAtIndex(source, 0, (CFDictionaryRef)thumbOpts);

  //But i want to use following code, which fails.
  CGImageRef image = CGImageSourceCreateImageAtIndex(source, 0, (CFDictionaryRef)thumbOpts);

Is there any other better way of doing it easily?

related questions