Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ExifLocation.prototype.loadFromArrayBuffer = function(arrayBuffer, cb) {
var exifReader;
if (this.exifReader) {
throw new Error('Already loaded.');
}
exifReader = new ExifReader();
try {
// Parse the Exif tags.
exifReader.load(arrayBuffer);
// Or, with jDataView you would use this:
// exif.loadView(new jDataView(arrayBuffer));
} catch (err) {
this.err = err;
return cb(err, this);
}
this.exifReader = exifReader;
cb(null, this);
};