path-exif-mapper
v0.2.2
Published
Maps an image path to its exif data
Downloads
5
Readme
path-exif-mapper
This simple wrapper for the ExifImage class allows a user to pass a path to a '.jpg' file and a callback that receives both the image path and the extracted Exif Data.
Install
npm i path-exif-mapper
Sample Usage
var pathExifMapper = require('path-exif-mapper').PathExifMap;
pathExifMapper("/path/to/image.jpg", function (path, exifData) {
console.log({
path: path,
exifData: exifData
});
});
could return:
{ path: '/path/to/image.jpg',
exifData:
{ image:
{ ModifyDate: '2015:01:01 09:50:14',
GPSInfo: 543,
Model: 'Nexus 5',
YCbCrPositioning: 1,
ResolutionUnit: 2,
YResolution: 72,
ExifOffset: 166,
XResolution: 72,
Make: 'LGE' },
thumbnail:
{ YResolution: 72,
ThumbnailLength: 39170,
ThumbnailOffset: 888,
Compression: 6,
ResolutionUnit: 2,
XResolution: 72 },
//...
interoperability: { InteropIndex: 'R98', InteropVersion: <Buffer 30 31 30 30> },
makernote: {}
}
}