Java metadata read and write

给你一囗甜甜゛ 提交于 2019-12-07 14:22:54

问题


Is it possible in a generic way (for all image types) to be able to read and write metadata in Java, i've found a few examples but they are always specific, for JPEG or PNG for example. I need something generic enough to not if else statement everywhere.


回答1:


I don't want to rewrite the source but here is an great example

http://johnbokma.com/java/obtaining-image-metadata.html

Look at the readandDisplayMetaData function and it will give you an idea.




回答2:


Every file format has a different way of storing metadata. Asking for a generic way to read and write metadata is like asking for a generic way to read and write all file formats.



来源:https://stackoverflow.com/questions/16895251/java-metadata-read-and-write

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!