exif-distage
v0.1.8
Published
Get age in h:m:s format (from a supplied dateTime) and distance in meters (from supplied GPS lat, lon) of an image with an EXIF source.
Downloads
13
Maintainers
Readme
exif-distage
Get age in h:m:s format (from a supplied dateTime) and/or distance in meters (from supplied GPS lat, lon) of an image with an EXIF source.
Install
$ npm install exif-distage --save
Testing (with mocha)
$ cd /node_modules/exif-distage
$ npm test
How to use
In Javascript
var distage = require('exif-distage');
distage.parse('image.jpg', new Date(), [19.003725787037036, 99.00135592592591], function(err, response) {
if (err) { throw err };
console.log(response);
});
var distage = require('exif-distage');
distage.parse('image.jpg', [19.003725787037036, 99.00135592592591], new Date(), function(err, response) {
if (err) { throw err };
console.log(response);
});
var distage = require('exif-distage');
distage.parse('image.jpg', [19.003725787037036, 99.00135592592591], function(err, response) {
if (err) { throw err };
console.log(response);
});
var distage = require('exif-distage');
distage.parse('image.jpg', new Date(), function(err, response) {
if (err) { throw err };
console.log(response);
});
should return an object similar to this
{
age: {
h: 1,
m: 0,
s: 0
},
queryTimestamp: 1429024373,
creationTimestamp: 1429020773,
distance: 1000000
}
License
MIT