From 0a88c3e1f4673f57b822e50c4797c85fd75cdd7b Mon Sep 17 00:00:00 2001 From: Daniel Beardsley Date: Wed, 30 Nov 2016 10:21:38 -0700 Subject: [PATCH 1/3] Image comparison: disable largeImageThreshold This "feature" makes the output nearly unusable and ironically significantly larger (at the benefit of saving ~20% of runtime) Set the number high enough that we'll never hit it. We had to bump node-resemble versions, but this hasn't changed the api at all. --- lib/compareImages.js | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/compareImages.js b/lib/compareImages.js index 15133a9..e2493fd 100644 --- a/lib/compareImages.js +++ b/lib/compareImages.js @@ -20,6 +20,10 @@ module.exports = function() { return done(); } + // This feature makes the output nearly worthless and impossible to read. + // Set it high enought that we never hit it. + resemble.outputOptions({largeImageThreshold:1000000000}) + /** * compare images */ diff --git a/package.json b/package.json index ba706c1..545936d 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "fs-extra": "^0.18.2", "glob": "^5.0.5", "gm": "^1.17.0", - "node-resemble-js": "0.0.4", + "node-resemble-js": "0.2.0", "request": "^2.55.0", "rimraf": "^2.3.2", "tar": "^2.1.0", From 3f1c212d0e6bd35a6b3117f3ebbc65b584512b21 Mon Sep 17 00:00:00 2001 From: Daniel Beardsley Date: Wed, 30 Nov 2016 11:22:23 -0700 Subject: [PATCH 2/3] largeImageThreshold: disable explicitly --- lib/compareImages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compareImages.js b/lib/compareImages.js index e2493fd..454e087 100644 --- a/lib/compareImages.js +++ b/lib/compareImages.js @@ -21,8 +21,8 @@ module.exports = function() { } // This feature makes the output nearly worthless and impossible to read. - // Set it high enought that we never hit it. - resemble.outputOptions({largeImageThreshold:1000000000}) + // Turn it off. + resemble.outputOptions({largeImageThreshold:0}) /** * compare images From ee9bc38e9405f759c14e942990bd22bf6c770d31 Mon Sep 17 00:00:00 2001 From: Daniel Beardsley Date: Fri, 27 Jan 2017 00:35:09 -0700 Subject: [PATCH 3/3] resemble: call the correct function It's called outputSettings, not outputOptions. --- lib/compareImages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compareImages.js b/lib/compareImages.js index 454e087..be59afa 100644 --- a/lib/compareImages.js +++ b/lib/compareImages.js @@ -22,7 +22,7 @@ module.exports = function() { // This feature makes the output nearly worthless and impossible to read. // Turn it off. - resemble.outputOptions({largeImageThreshold:0}) + resemble.outputSettings({largeImageThreshold:0}) /** * compare images