添加EXIF标签' ImageUniqueID'到图像

时间:2012-11-26 09:50:19

标签: iphone ipad cocoa-touch exif javax.imageio

我已经取得了很大的成功,将EXIF数据添加到从UIImagePickerControl捕获的图像中...主要是按照其他问题的示例。即。

  1. UIImagePickerController and extracting EXIF data from existing photos
  2. Problem setting exif data for an image
  3. 但我从来没有设法(设置然后再检索)ImageUniqueID标签(kCGImagePropertyExifImageUniquID)

    我尝试过各种组合:

    NSMutableDictionary *EXIFDictionary = [[[metadataAsMutable objectForKey:(NSString *)kCGImagePropertyExifDictionary]mutableCopy]autorelease];
    
    [EXIFDictionary setObject:@"1234" forKey:(NSString*)kCGImagePropertyExifImageUniquID];
    
    //[EXIFDictionary setObject[NSNumber numberWithInt:1234] forKey:(NSString*)kCGImagePropertyExifImageUniquID];
    
    [metadataAsMutable setObject:EXIFDictionary forKey:(NSString *)kCGImagePropertyExifDictionary];
    
    //then save the mutable data back to Image
    

    我使用此方法设置的所有其他EXIF,TIFF和IPTC键都会成功保存,然后使用类似方法检索。

    任何想法如何设置此值?

0 个答案:

没有答案