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

compare pixel of image for PNG, JPEG or DataURL.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
48
increased by166.67%
Maintainers
1
Weekly downloads
 
Created
Source

pixel-compare


compare pixel of image for PNG, JPEG or DataURL.

example

const pixelCompare = require("pixel-compare");
pixelCompare({
    basedImage: "./test/test-images/dragon1.png",
    testImage: "./test/test-images/dragon2.png",
    outputImage: "./test/output-images/result.png"
})
.then(isSame => {
	//if two image are the same
});

install

npm insatll --save pixel-compare

api

pixelCompare({ baseImage, testImage, [outputImage], [baseColor], [testColor] })

  • baseImage: base image path or data url

  • testImage: test image path or data url

  • outputImage: is optional, output image path

  • baseColor: is optional, array of 4 for base color is test color is all 0

  • testColor: is optional, array of 4 for test color is base color is all 0

return a promise with a boolean to indicate is two images are the same.

FAQs

Package last updated on 12 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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