mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
partially fix exif tests to fix overall grunt
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
|
||||
module.exports = function(RED) {
|
||||
"use strict";
|
||||
var ExifImage = require('exif').ExifImage;
|
||||
|
||||
function convertDegreesMinutesSecondsToDecimals(degrees, minutes, seconds) {
|
||||
var result;
|
||||
@@ -15,6 +14,7 @@ module.exports = function(RED) {
|
||||
if (this.mode === "worldmap") { this.property = "payload.content"; }
|
||||
else { this.property = n.property || "payload"; }
|
||||
var node = this;
|
||||
var ExifImage = require('exif').ExifImage;
|
||||
|
||||
/***
|
||||
* Extracts GPS location information from Exif data. If enough information is
|
||||
@@ -79,7 +79,8 @@ module.exports = function(RED) {
|
||||
}
|
||||
|
||||
this.on("input", function(msg) {
|
||||
if (node.mode === "worldmap" && (msg.payload.action !== "file" || msg.payload.type.indexOf("image") === -1)) { return; } // in case worldmap-in not filtered.
|
||||
if (node.mode === "worldmap" && Buffer.isBuffer(msg.payload)) { node.property = "payload"; }
|
||||
else if (node.mode === "worldmap" && (msg.payload.action !== "file" || msg.payload.type.indexOf("image") === -1)) { return; } // in case worldmap-in not filtered.
|
||||
try {
|
||||
var value = RED.util.getMessageProperty(msg,node.property);
|
||||
if (value !== undefined) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-node-exif",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"description": "A Node-RED node that extracts Exif information from JPEG image buffers.",
|
||||
"dependencies": {
|
||||
"exif": "^0.6.0"
|
||||
|
Reference in New Issue
Block a user