1
votes

I need to get metadata (EXIF and other) from images stored in the iOS photo gallery. Therefore I need the original picture data instead of an UIImage object.

At the moment I get the asset-image url using imagepickercontroll and ALAssetsLibrary as described here: display image from URL retrieved from ALAsset in iPhone

This url can be used to get an UIImage object but how can I get the original image so that I can process it's metadata?

Regards,

1
Thanks for the link. Access to the "raw" file data seems only possible using the mentioned private API trick described in the linked post. - Hyndrix

1 Answers

2
votes

ALAssetsLibrary to retrieve all images here

ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library assetForURL:assetURL
resultBlock:^(ALAsset *asset)  {
    NSDictionary *metadata = asset.defaultRepresentation.metadata;
    imageMetadata = [[NSMutableDictionary alloc] initWithDictionary:metadata];
    [self addEntriesFromDictionary:metadata];
}
failureBlock:^(NSError *error) {
}];
[library autorelease];

Refer more getting-metadata-from-images-on-ios link and get helped.