pixel-compare
Advanced tools
Comparing version 1.0.0 to 1.0.1
12
index.js
@@ -28,8 +28,8 @@ "use strict"; | ||
const basedImagePromise = new Promise((resolve, reject) => { | ||
getPixels(basedImagePath, function(err, pixels){ | ||
if (err) { | ||
reject("Reading based image failed" + err); | ||
} | ||
resolve(pixels); | ||
}); | ||
getPixels(basedImagePath, function(err, pixels){ | ||
if (err) { | ||
reject("Reading based image failed" + err); | ||
} | ||
resolve(pixels); | ||
}); | ||
}); | ||
@@ -36,0 +36,0 @@ |
{ | ||
"name": "pixel-compare", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "compare pixel of image for PNG, JPEG or DataURL.", | ||
@@ -10,4 +10,4 @@ "main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/tiansijie/pixel-compare.git" | ||
"type": "git", | ||
"url": "https://github.com/tiansijie/pixel-compare.git" | ||
}, | ||
@@ -14,0 +14,0 @@ "author": "Sijie Tian", |
# pixel-compare | ||
------------ | ||
compare pixel of image for PNG, JPEG or DataURL. | ||
@@ -16,6 +15,9 @@ | ||
.then(isSame => { | ||
//if two image are the same | ||
//if two images are the same | ||
}); | ||
``` | ||
| Base Image | Test Image | Result Image | | ||
| ------------- |:-------------:| -----:| | ||
| <img src="./test/test-images/dragon1.png" width="160"> | <img src="./test/test-images/dragon2.png" width="160"> | <img src="./test/output-images/result.png" width="160"> | | ||
@@ -45,2 +47,2 @@ install | ||
##### `return` a promise with a boolean to indicate is two images are the same. | ||
##### `return` a promise with a boolean to indicate if two images are the same. |
410353
47