Compare does not respect precision

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
ybezman
Posts: 1
Joined: 2019-07-09T23:47:01-07:00
Authentication code: 1152

Compare does not respect precision

Post by ybezman »

Hi.
I've found the following issue with the compare command:

Code: Select all

YB@DESKTOP-B4TNF55 MINGW64 ~
$ compare -precision 10 -verbose -metric ncc P1023185.png ../q/P1023185.png.jpg info:
compare.exe: unrecognized option `-precision' @ error/compare.c/CompareImagesCommand/857.
Alternatively, when using the environment variable:

Code: Select all

YB@DESKTOP-B4TNF55 MINGW64 /d/YB/jpeg/Session/Output/b
$ env MAGICK_PRECISION=10 compare -verbose -metric ncc P1023185.png ../q/P1023185.png.jpg info:
P1023185.png PNG 2168x3008 2168x3008+0+0 8-bit sRGB 11144067B 0.188u 0:00.210
../q/P1023185.png.jpg JPEG 2168x3008 2168x3008+0+0 8-bit sRGB 3478309B 0.141u 0:00.722
Image: P1023185.png

....

  Properties:
    date:create: 2019-06-29T21:12:31+00:00
    date:modify: 2019-06-29T21:12:33+00:00
    distortion: 0.999029273

....

Image: P1023185.png
  Channel distortion: NCC
    red: 0.99868
    green: 0.999315
    blue: 0.999093
    all: 0.999029
The precision of the "distortion" property changes from 6 to 10, but the red, green, blue and all results don't.

Let me know if you need additional information.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Compare does not respect precision

Post by magick »

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.
Post Reply