3

我想在选定点添加图像的温度数据。它是否有任何预定义的属性,或者我们是否可以在 Tiff 文件中创建自定义/私钥来存储图像的温度数据。

回答:

使用 TIFF 库文档在 TIFF 文件中创建您自己的自定义键。在文档中,他提到了如何创建和使用自定义键。

http://www.libtiff.org/libtiff.html

4

1 回答 1

0

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.

于 2013-06-26T19:44:02.047 回答