如何通过iOS SDK写入或更新照片中的IPTC元数据?
我正在尝试使用 iOS SDK 将 IPTC 元数据添加到图像中,但无法使其工作。无论我如何尝试,带有 IPTC 元数据的字典最终都不会存储在保存到照片库的图像中。这既适用于我在最初没有 IPTC 元数据时添加 IPTC 元数据的图像,也适用于具有 IPTC 元数据的图像(例如,原始图像具有 IPTC 元数据并通过 iTunes 同步到 iOS 设备)。在这两种情况下,当我使用 ALAssetsLibrary writeImageToSavedPhotosAlbum:orientation:completionBlock:
方法保存图像,然后再次检索图像时,IPTC 元数据(添加或修改)不在检索到的图像中。
我见过很少的处理 IPTC 元数据的实际代码示例。有很多处理 EXIF 和 GPS 元数据的示例,我能够成功地操作这两个元数据。但 IPTC 的运气不佳。
如果有人能够完成此任务,特别是使用现有的 iOS SDK API,我很想了解详细信息,特别是查看一些示例代码片段。
I am trying to add IPTC metadata to images using the iOS SDK and am unable to get it to work. No matter what I try, the dictionary with the IPTC metadata does not end up getting stored in the image saved to the photo library. This applies both to images to which I add IPTC metadata when originally there was none, and to images which have IPTC metadata (e.g., the original image had IPTC metadata and was sync'ed to the iOS device with iTunes). In both cases when I save the image using the ALAssetsLibrary writeImageToSavedPhotosAlbum:orientation:completionBlock:
method, and then retrieve the image again, the IPTC metadata (added or modified) is not in the retrieved image.
I have seen very little if any actual code samples that deal with IPTC metadata. There are plenty of examples that deal with EXIF and GPS metadata, both of which I am able to successfully manipulate. But no luck with IPTC.
If anyone has been able to accomplish this, especially using the stock iOS SDK APIs, I'd love to know the particulars and especially see some example code fragments.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论