get-exif
A Node.js module to get Exif data from JPEG data
const readFile = promises;const getExif = ; async { const exif = Exif; // 33434: ID of the `ExposureTime` tag exif'33434'; //=> [1, 100] // 36867: ID of the `DateTimeOriginal` tag exif'36867'; //=> '2017:11:19 08:47:19'};
Installation
npm install get-exif
API
const getExif = ;
getExif(data)
data: Buffer | string
(data of a JPEG file)
Return: Object
It reads Exif data from a Buffer
using Piexifjs and return it as an Object
.
imageBuffer; //=> <Buffer ff d8 ff e1 94 41 45 78 69 66 00 00 49 49 2a ...> ; /*=> { '0th': { ... }, '1st': { ... }, Exif: { ... }, GPS: { ... } Interop: { ... }, thumbnail: ' ... '} */
It also accepts a Buffer
-to-latin1
encoded string.
imageString; //=> 'ÿØÿáAExif\u0000\u0000II*\u0000\b\u0000 ...' ;
Related
- read-exif — Get Exif data from a file instead of a
Buffer
orstring
License
ISC License © 2018 - 2019 Shinnosuke Watanabe