1.0.0 • Published 12 months ago

image-compared v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

image-compared

remove repeat image

Usage

npm i image-compared

Methods

  • compareImages
  • removeDuplicateImages

1、Compare whether two images are the same.

const imageCompare = require("image-compared");

imageCompare.compareImages("image1.jpg", "image2.jpg").then((isSame) => {
  console.log(isSame ? `They are the same` : "They are different");
});

2、Delete duplicate images in the specified directory.

const imageCompare = require("image-compared");

imageCompare.removeDuplicateImages("src/images", ["jpg", "jpeg", "png", "gif"]);
1.0.0

12 months ago