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

img-diff-rect

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

img-diff-rect

mark differences of two images in rectangles

1.0.2
latest
Source
npm
Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

img-diff-rect

NPM version node version Test coverage License

Mark differences of two images in rectangles based on x-img-diff-js.

Demo

output 1

output 1

Usage

You need Node.js >= v8.0.0

const imgDiffRect = require('img-diff-rect');

imgDiffRect({
  originImg: './origin.png',
  expectedImg: './expected.png',
  outputDir: './output',
}).then((result) => {
  console.log(result);
  // {
  //   isDifferent: true,
  //   originOutputImg: './output/origin.png',
  //   expectedOutputImg: './output/expected.png',
  // }
});

Type

DifferOption

interface DifferOption {
  originImg: string;
  expectedImg: string;
  outputDir?: string;
}

DifferResult

interface DifferResult {
  isDifferent: boolean;
  originOutputImg?: string;
  expectedOutputImg?: string;
}

Keywords

image

FAQs

Package last updated on 07 Aug 2020

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