]> granicus.if.org Git - imagemagick/commitdiff
Correct fuzz distance algorithm to ensure expected results
authorCristy <urban-warrior@imagemagick.org>
Sat, 18 Nov 2017 13:12:17 +0000 (08:12 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 18 Nov 2017 13:14:02 +0000 (08:14 -0500)
MagickCore/compare.c

index beaf119ef65f0117e7c825dcbe1e07366b026ca9..96a104518391c2d7595df1a470ac1842590010ba 100644 (file)
@@ -384,6 +384,7 @@ static MagickBooleanType GetAbsoluteDistortion(const Image *image,
   */
   status=MagickTrue;
   fuzz=GetFuzzyColorDistance(image,reconstruct_image);
+  fuzz*=fuzz;
   rows=MagickMax(image->rows,reconstruct_image->rows);
   columns=MagickMax(image->columns,reconstruct_image->columns);
   image_view=AcquireVirtualCacheView(image,exception);