Reputation: 4452
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,
Upvotes: 1
Views: 2339
Reputation: 38259
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.
Upvotes: 2