javascript 使用javascript从图像文件中读取元数据
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5929356/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Read meta data from image file with javascript
提问by Alex
Is there any way to read the metadata of an image file in an <img>
tag using JavaScript?
有没有办法<img>
使用 JavaScript读取标签中图像文件的元数据?
回答by blueberryfields
I think this tool is what you're looking for:
我认为这个工具就是你要找的:
https://github.com/exif-js/exif-js
https://github.com/exif-js/exif-js
defunct (might be able to find with wayback machine or equivalent): http://blog.nihilogic.dk/2008/08/imageinfo-reading-image-metadata-with.html
已停产(可能可以用回程机或同等设备找到):http: //blog.nihilogic.dk/2008/08/imageinfo-reading-image-metadata-with.html
回答by Oswald
No. You would have to download the image (e.g. using XmlHttpRequest) and parse the image yourself.
不可以。您必须下载图像(例如使用 XmlHttpRequest)并自己解析图像。