mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
make exif node add exif data even if gps missing (#393)
This commit is contained in:
parent
032a9d6435
commit
29694dd2cb
@ -73,13 +73,17 @@ module.exports = function(RED) {
|
|||||||
node.log(error.toString());
|
node.log(error.toString());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//msg.payload remains the same buffer
|
if (exifData) {
|
||||||
if ((exifData) && (exifData.hasOwnProperty("gps")) && (Object.keys(exifData.gps).length !== 0)) {
|
|
||||||
msg.exif = exifData;
|
msg.exif = exifData;
|
||||||
|
if((exifData.hasOwnProperty("gps")) && (Object.keys(exifData.gps).length !== 0)) {
|
||||||
addMsgLocationDataFromExifGPSData(msg);
|
addMsgLocationDataFromExifGPSData(msg);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
node.warn("The incoming image did not contain Exif GPS data, nothing to do. ");
|
node.log("The incoming image did not contain Exif GPS data.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
node.warn("The incoming image did not contain any Exif data, nothing to do. ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
node.send(msg);
|
node.send(msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user