Comparing version 0.3.3 to 0.4.0
@@ -232,3 +232,3 @@ // jshint esversion: 6, globalstrict: true, strict: true | ||
} else { | ||
if (Math.abs(this._oldPix[i] - this._newPix[i]) >= this._difference) { | ||
if (Math.abs(this._grayscale(this._oldPix[i], this._oldPix[i + 1], this._oldPix[i + 2]) - this._grayscale(this._newPix[i], this._newPix[i + 1], this._newPix[i + 2])) >= this._difference) { | ||
this._diffs++; | ||
@@ -275,3 +275,3 @@ } | ||
} else { | ||
if (Math.abs(this._oldPix[i] - this._newPix[i]) >= this._difference) { | ||
if (Math.abs(this._grayscale(this._oldPix[i], this._oldPix[i + 1], this._oldPix[i + 2]) - this._grayscale(this._newPix[i], this._newPix[i + 1], this._newPix[i + 2])) >= this._difference) { | ||
this._diffs++; | ||
@@ -278,0 +278,0 @@ } |
{ | ||
"name": "pam-diff", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"description": "Measure differences between pixel arrays extracted from pam images", | ||
@@ -33,4 +33,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"pipe2pam": "^0.3.0" | ||
"pipe2pam": "^0.4.3" | ||
} | ||
} |
18758