]> granicus.if.org Git - imagemagick/blobdiff - tests/validate.c
(no commit message)
[imagemagick] / tests / validate.c
index d3ca080d92e0f09d100b04436e858f39b5d6ad36..7b391801eab3f1d00b72d2e7c11001cfdab1b6b2 100644 (file)
 #include "MagickCore/string-private.h"
 #include "validate.h"
 \f
-/*
-  Define declarations.
-*/
-#define DistortionEpsilon  ((MagickRealType) 1.0e-5)
-\f
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %                                                                             %
@@ -638,9 +633,9 @@ static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
 #endif
       if (IssRGBColorspace(reference_image->colorspace) == MagickFalse)
         fuzz+=0.3;
-      fuzz+=DistortionEpsilon;
+      fuzz+=MagickEpsilon;
       difference_image=CompareImages(reference_image,reconstruct_image,
-        MeanSquaredErrorMetric,&distortion,exception);
+        RootMeanSquaredErrorMetric,&distortion,exception);
       reconstruct_image=DestroyImage(reconstruct_image);
       reference_image=DestroyImage(reference_image);
       if (difference_image == (Image *) NULL)
@@ -850,9 +845,9 @@ static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
 #endif
       if (IssRGBColorspace(reference_image->colorspace) == MagickFalse)
         fuzz+=0.3;
-      fuzz+=DistortionEpsilon;
+      fuzz+=MagickEpsilon;
       difference_image=CompareImages(reference_image,reconstruct_image,
-        MeanSquaredErrorMetric,&distortion,exception);
+        RootMeanSquaredErrorMetric,&distortion,exception);
       reconstruct_image=DestroyImage(reconstruct_image);
       reference_image=DestroyImage(reference_image);
       if (difference_image == (Image *) NULL)
@@ -1029,7 +1024,7 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info,
         Compare reference to reconstruct image.
       */
       difference_image=CompareImages(reference_image,reconstruct_image,
-        MeanSquaredErrorMetric,&distortion,exception);
+        RootMeanSquaredErrorMetric,&distortion,exception);
       reconstruct_image=DestroyImage(reconstruct_image);
       reference_image=DestroyImage(reference_image);
       if (difference_image == (Image *) NULL)