Search code examples
iosimagemetadata

How to get image metadata in ios


I want to display image metadata using ios. Meta data like Aperture, Shutterspeed, Exposure Compensation, ISO, Lens Focal Length, etc. So please help me if anybody has idea.


Solution

  • CGImageSourceRef source = CGImageSourceCreateWithURL( (CFURLRef) aUrl, NULL);
    CGImageSourceRef source = CGImageSourceCreateWithData( (CFDataRef) theData, NULL);
    NSDictionary* metadata = (NSDictionary *)CFBridgingRelease(CGImageSourceCopyPropertiesAtIndex(source,0,NULL));
    CFRelease(source);
    

    Check the dictionary contents here.