如何在Javascript中提取本地图像的元数据? [英] How do I extract the metadata of a local image in Javascript?
问题描述
我想获取用户拖动并放入网页的图像的元数据。我有拖放设置。但是,图像实际上并未上载到服务器。它可以在本地访问。我还可以使用Javascript从图像中获取元数据吗?如果是这样,我该怎么做?有什么好的库?
I would like to get the metadata of an image that a user drags and drops into a webpage. I have the drag and drop set up. However, the image isn't actually uploaded to a server. It's accessed locally. Can I still get the metadata from the image using Javascript? If so, how do I do this? What good libraries are there?
如果没有,我是否必须上传图像才能提取元数据?在Javascript中上传图像的最快方法是什么?
If not, do I absolutely have to upload the image in order to extract the metadata? What's the fastest way to upload an image in Javascript?
推荐答案
有一个库: ImageInfo - 使用JavaScript读取图像元数据。在它和 HTML5中的本地文件访问之间你应该能够得到它。
There is a library: ImageInfo - read image metadata with JavaScript. Between that and local file access in HTML5 you should be able to get it.
更新
imageinfo library 。
这篇关于如何在Javascript中提取本地图像的元数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!