You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to return the results to a parent function? I can't seem to get exifData to return. Even if i throw something like return('test test'); as the first line after ExifImage({.... it doesn't return.
var ExifImage = require('exif').ExifImage;
function myExif() {
try {
new ExifImage({image: 'exif4m.jpg'}, function (error, exifData) {
if (error) {
console.log('Error: ' + error.message);
return null;
} else {
return exifData; // Do something with your data!
}
});
} catch (error) {
console.log('Error: ' + error.message);
return null;
}
}
console.log(myExif());
The console.log returns undefined.
The text was updated successfully, but these errors were encountered:
Is it possible to return the results to a parent function? I can't seem to get exifData to return. Even if i throw something like return('test test'); as the first line after ExifImage({.... it doesn't return.
The console.log returns undefined.
The text was updated successfully, but these errors were encountered: