Я хочу получить exif с картинки. как я делаю это оптимально?Как получить exif с фото?
NSData *dataOfImageFromGallery = UIImageJPEGRepresentation (workingImage,0.5);
CGImageSourceRef imageSource;
imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)dataOfImageFromGallery, NULL);
if (imageSource == NULL) {
// Error loading image ...
return; }
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:NO], (NSString *)kCGImageSourceShouldCache, nil];
CFDictionaryRef imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, (__bridge CFDictionaryRef)options);
if (imageProperties) {
NSNumber *width = (__bridge NSNumber *)CFDictionaryGetValue(imageProperties, kCGImagePropertyPixelWidth);
NSNumber *height = (__bridge NSNumber *)CFDictionaryGetValue(imageProperties, kCGImagePropertyPixelHeight);
CFRelease(imageProperties);
NSLog(@"width: %@", width);
NSLog(@"height: %@", height);
}
это печать width
и height
но свойства EXIF составляет около 40 в CGImageProperties.h
в ImageIO.h
библиотечный файл, и я не знаю, как печатать все сразу.
Я не понимаю. Я должен написать эту функцию. вы даете мне свое приложение. –
извините, мой проект основан на exiftool http://owl.phy.queensu.ca/~phil/exiftool/ – SAKrisT