用于将 IPTC 元数据读取和写入 JPEG 和 TIFF 的 Java 库
有人知道一些开源 Java 库用于读取和写入 IPTC 元数据到 JPEG 和 TIFF 吗?现在我正在使用 Apache Sanselan。不幸的是,它只能读取 IPTC,不能写入 (http://commons.apache.org/sanselan/formatsupport.html)。
非常感谢您的帮助。
丹尼斯.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
这似乎是一个相当老的问题,但以下是一些有用的信息:
可以使用 Apache Commons Imaging(以前称为 Sanselan)或元数据提取器(由 Draw noaks 开发)来读取 EXIF、IPTC 等元数据。
元数据的写入可以使用 Apache Commons Imaging 使用以下类来完成:
EXIF - ExifRewriter (http://commons.apache.org/proper/commons-imaging/apidocs/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.html )
IPTC - JpegIptcRewriter (http://commons.apache.org/proper/commons-imaging/apidocs/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.html)
XMP - JpegXmpRewriter ( http:// /commons.apache.org/proper/commons-imaging/apidocs/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpRewriter.html)
This seems to be quite a old question but following is some helpful info:
reading of metadata such as EXIF,IPTC..etc can be done using Apache Commons Imaging(Formerly Sanselan) or Metadata Extractor(by drew noaks).
writing of metadata can be done using Apache Commons Imaging using following classes:
EXIF - ExifRewriter (http://commons.apache.org/proper/commons-imaging/apidocs/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.html)
IPTC - JpegIptcRewriter (http://commons.apache.org/proper/commons-imaging/apidocs/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.html)
XMP - JpegXmpRewriter (http://commons.apache.org/proper/commons-imaging/apidocs/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpRewriter.html)
查看 IIM4J。使用
IIMWriter
将 IPTC IIM 标签写入 (jpeg) 图像。Take a look at IIM4J. Use
IIMWriter
to write IPTC IIM tags into (jpeg) images.Apache Commons Imaging(以前称为 sanselan) 添加了对在 svn 存储库代码中写入 IPTC 元数据的支持,以供其使用下一个版本。我已经在从 svn repo 签出的最新主干代码中验证了这一点。代码看起来很稳定,所以我希望发布不会太远。对于我的项目来说这已经足够好了。
The Apache Commons Imaging (formerly sanselan) has added support for writing IPTC metadata in the svn repo code for their next release. I have verified that this is so in the latest trunk code checked out from svn repo. The code seems stable so I am hoping a release is not too far away. For my project this is good enough.
我过去曾审视过自己,但没有找到。我建议查看一个开源项目,例如 http://sourceforge.net/projects/image-tagger / 看看他们是如何做到的。
I've looked myself in the past but not found one. I would suggest looking at an open source project such as http://sourceforge.net/projects/image-tagger/ and see how they do it.
要阅读元数据,我认为您应该查看“metadata-extractor” - 一个开源项目(Apache 2.0 许可证),开发用于从图像文件读取元数据的 Java 库。
目前,该项目可以访问以下图像元数据:
“metadata-extractor" 托管于 Google 代码。
这是 2.4.0 版本的一个简单的代码示例:
For reading metadata I think you should have a look on "metadata-extractor" - an Open Source Project (Apache 2.0 licence) that develops a Java library for reading metadata from image files.
At the moment, this project can get access to the following metadata of images:
The "metadata-extractor" is hosted at google code.
Here is a little straightforward code-example for the 2.4.0 version:
另一个包含详细文档的库:https://docs.groupdocs.com/display/metadatajava,符合IIMV4.2
Another library with detailed documentation: https://docs.groupdocs.com/display/metadatajava, compliant with IIMV4.2