我需要我的照片编辑器应用程序来保留我的应用程序打开的原始照片中存在的未知元数据条目(例如,非标准 XMP 元数据)
我尝试使用 Apple 的内置元数据读/写元数据,但没有成功。
有没有办法将所有现有元数据复制到缓冲区,按原样写入,然后仅更改特定条目?
最佳答案
是的。
SXMPFiles myFile;
ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
myFile.GetXMP(_meta); // _meta is a data member of the class that represents your photo (probably a subclass of NSDocument).
_meta
写入输出文件,然后设置您喜欢的特定元数据条目。 有关读取和写入 XMP 元数据的更多详细信息,请参阅 Adobe XMP 编程指南。
关于metadata - 如何在 Objective C 中保留 XMP 元数据?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16278992/