[英]How to get EXIF data of an image (JPG, JPEG, PNG) in node js?
I am trying to retrieve EXIF data of an image from which I want to extract GPS related information ie, Latitude and logitude.我正在尝试检索要从中提取 GPS 相关信息(即纬度和对数)的图像的 EXIF 数据。 So far I have tried atleast 4-5 EXIF packages available in npm/node - exif, exif-parser, node-exif, exifr, exif-js and other 2-3 but didn't get any solid results.
到目前为止,我已经尝试了 npm/node 中可用的至少 4-5 个 EXIF 包——exif、exif-parser、node-exif、exifr、exif-js 和其他 2-3 个,但没有得到任何可靠的结果。 Most of them only supported one file type (only JPG or only PNG).
其中大多数仅支持一种文件类型(仅 JPG 或仅 PNG)。 I got my best results with eixfr - I was able to extract data of the first image(regardless of extension),but after that when I tried it with the second image it crashed (happened everytime).
我用 eixfr 得到了最好的结果——我能够提取第一张图像的数据(无论扩展名如何),但是之后当我用第二张图像尝试它时它崩溃了(每次都发生)。
So is there any npm package with which I can retrieve EXIF data of multiple images with different extensions (atleast PNG, JPG , JPEG)?那么是否有任何 npm 包可以用来检索具有不同扩展名(至少 PNG、JPG、JPEG)的多个图像的 EXIF 数据?
By using node-exif Package in NodeJs We can get all related data:-通过在 NodeJs 中使用node-exif包,我们可以获得所有相关数据:-
Please refer the link for get the full usage [1]: https://www.npmjs.com/package/exif请参阅链接以获取完整用法 [1]: https ://www.npmjs.com/package/exif
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.