gm icon indicating copy to clipboard operation
gm copied to clipboard

gm.compare using imagemagick always return `true`

Open pheenomenon opened this issue 5 years ago • 0 comments

gm.compare imagemagick always return true am I missing something here? Any pointers will help.

const GM = require("gm").subClass({ imageMagick: true });

GM().compare(expectedImage, actualImage, function (err, isEqual, equality, raw) {
      if (err) throw err;
      console.log('The images are equal: %s', isEqual);
      console.log('Actual equality: %d', equality)
      console.log('Raw output was: %j', raw);
    });

Output:

The images are equal: true
Actual equality: 0.182172
Raw output was: "11938.6 (0.182172)"

always returns true, even for completely different images.

Imagemagick version:

convert --version
Version: ImageMagick 7.0.10-26 Q16 x86_64 2020-08-09 https://imagemagick.org

gm version:

"gm": "^1.23.1"

pheenomenon avatar Aug 29 '20 01:08 pheenomenon