Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

image-compare

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-compare

Compares a collection of images against a target image, returns the image in the collection that closest resembles the target image.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

IMAGE-COMPARE

Node.js utility to help you quickly identify which image from an array closest resembles a target image.

Usage

image-compare PATH-TO-TARGET-IMAGE [IMAGE, ...]

Returns the path of the closest resembling image.

For example:

image-compare 'test/img/01.jpg' 'test/img/02.jpg' 'test/img/03.jpg'

Will return text:

test/img/02.jpg

Installation

npm install image-compare

How Image-compare works

Image-compare is really a nice API sat between the command line and GraphicsMagick. It uses the GraphicsMagick compare method to create a number that represents the difference between the target image and each image in the array. Image-compare then returns the image that has the smallest amount of difference. GraphicsMagick.compare isn't a silver bullet, you can't get a 100% reliable comparison between images from it. The best way to work out which image from a collection closest resembles another image is to compare the size of difference.

FAQs

Package last updated on 05 Mar 2014

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