New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pixel-compare

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixel-compare - npm Package Compare versions

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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc