问题
I want to add temperature data of image at selected point. Is there any pre defined property of it or does we can create custom/ private keys in Tiff file to store temperature data of image.
Answer:
Use TIFF Library documentation to create your own custom keys in TIFF file. in documentaiton he mention how to create and use of custom keys.
http://www.libtiff.org/libtiff.html
回答1:
You can't add custom EXIF keys, but you may be able to cheat...
You could look up the available keys and see if any of them are a legitimate match. Or you could add a custom format string to kCGImagePropertyTIFFImageDescription
to store your data. It could be a snippet of JSON for example.
NSMutableDictionary *properties = [[NSMutableDictionary alloc] init];
NSMutableDictionary *tags = [[NSMutableDictionary alloc] init];
[properties setObject:@"whatever text you want goes here" forKey:(NSString *)kCGImagePropertyTIFFImageDescription];
[tags setObject:properties forKey:(NSString *)kCGImagePropertyTIFFDictionary];
Then save the tags with the image.
The other keys are documented here.
来源:https://stackoverflow.com/questions/16880183/can-we-add-custom-keys-in-tiff-file-or-how-to-add-temperature-data-in-image-prop