How do I extract the metadata of a local image in Javascript?

后端 未结 2 1050
忘掉有多难
忘掉有多难 2021-01-03 01:26

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 se

相关标签:
2条回答
  • 2021-01-03 02:12

    Basically, JavaScript cannot "touch" your local file, you just can do that using HTML5 + JavaScript or using Flash ActionScript

    0 讨论(0)
  • 2021-01-03 02:14

    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.

    UPDATE New link for the imageinfo library.

    0 讨论(0)
提交回复
热议问题