Comparing version
10
index.js
@@ -1,2 +0,1 @@ | ||
// jshint esversion: 6, globalstrict: true, strict: true, bitwise: false | ||
'use strict'; | ||
@@ -93,2 +92,5 @@ | ||
if (typeof callback === 'function') { | ||
if (callback.length !== 1){ | ||
throw new Error('Callback function must only accept 1 argument'); | ||
} | ||
this._callback = callback; | ||
@@ -434,2 +436,7 @@ } else { | ||
PamDiff.prototype._flush = function (callback) { | ||
this.resetCache(); | ||
callback(); | ||
}; | ||
PamDiff.prototype.resetCache = function () { | ||
delete this._oldPix; | ||
@@ -440,3 +447,2 @@ delete this._newPix; | ||
this._parseChunk = this._parseFirstChunk; | ||
callback(); | ||
}; | ||
@@ -443,0 +449,0 @@ |
{ | ||
"name": "pam-diff", | ||
"version": "0.9.2", | ||
"version": "0.10.1", | ||
"description": "Measure differences between pixel arrays extracted from pam images", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "node tests/test.js && node tests/test2.js && node tests/test3.js" | ||
"test": "node tests/test.js && node tests/test2.js && node tests/test3.js", | ||
"preversion": "npm test" | ||
}, | ||
@@ -30,7 +31,8 @@ "repository": { | ||
"dependencies": { | ||
"polygon-points": "^0.4.0" | ||
"polygon-points": "^0.5.0" | ||
}, | ||
"devDependencies": { | ||
"nan": "^2.8.0", | ||
"pipe2pam": "^0.6.0" | ||
} | ||
} |
# pam-diff | ||
###### [](https://travis-ci.org/kevinGodell/pam-diff) [](https://github.com/kevinGodell/pam-diff/issues) [](https://raw.githubusercontent.com/kevinGodell/pam-diff/master/LICENSE) | ||
###### [](https://travis-ci.org/kevinGodell/pam-diff) [](https://ci.appveyor.com/project/kevinGodell/pam-diff/branch/master) [](https://github.com/kevinGodell/pam-diff/issues) [](https://raw.githubusercontent.com/kevinGodell/pam-diff/master/LICENSE) | ||
Measure differences between pixel arrays extracted from pam images. Works well with node module [pipe2pam](https://www.npmjs.com/package/pipe2pam) to extract pam images from an ffmpeg pipe. Supported ***tupltypes*** are ***rgb***, ***rgb_alpha***, ***grayscale***, and ***blackandwhite***. It is currently being used for a video motion detection project. | ||
@@ -4,0 +4,0 @@ ### installation: |
22696
1.55%421
1.2%2
100%+ Added
- Removed
Updated