有没有一种方法可以使用node.js读取图像元数据 [英] Is there a way to read image metadata using node.js

查看:121
本文介绍了有没有一种方法可以使用node.js读取图像元数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道我可以使用node.js读取文件元数据的方法吗?例如,我想读取jpeg文件(在Windows计算机上)的详细信息"选项卡上的注释"属性.参见下图,以了解我正在尝试从文件的元数据中读取什么.

Does any one know of a way that I can read file metadata using node.js? For example, I want to read the 'comment' attribute on the 'details' tab of a jpeg file (on a Windows machine). See image below to understand what it is I am trying to read from the file's metadata.

推荐答案

有许多NPM包可用于读取EXIF数据.例如:

There are a lot of NPM packages for reading EXIF data. For example:

https://www.npmjs.org/package/exif-parser

var parser = require('exif-parser').create(buffer);
var result = parser.parse();
console.log(result);

这篇关于有没有一种方法可以使用node.js读取图像元数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆