]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 9 Jan 2015 00:25:16 +0000 (00:25 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 9 Jan 2015 00:25:16 +0000 (00:25 +0000)
MagickCore/color-private.h
MagickCore/compare.c
MagickCore/pixel.c

index dec4ea9c8478c73854cb1ff4ac75b47fda55fe40..40d40b373610c0b7650f54235cad950f9adeee6b 100644 (file)
 extern "C" {
 #endif
 
-static inline double GetMaxImageFuzz(const Image *a,const Image *b)
-{
-  double
-    fuzz;
-
-  fuzz=(double) MagickMax(MagickMax(a->fuzz,b->fuzz),(MagickRealType)
-    MagickSQ1_2);
-  return(fuzz*fuzz);
-}
-
 extern MagickPrivate MagickBooleanType
   ColorComponentGenesis(void),
   IsEquivalentAlpha(const Image *,const PixelInfo *,const PixelInfo *),
@@ -43,6 +33,16 @@ extern MagickPrivate MagickBooleanType
 extern MagickPrivate void
   ColorComponentTerminus(void);
 
+static inline double GetFuzzyColorDistance(const Image *p,const Image *q)
+{
+  double
+    fuzz;
+
+  fuzz=(double) MagickMax(MagickMax(p->fuzz,q->fuzz),(MagickRealType)
+    MagickSQ1_2);
+  return(fuzz*fuzz);
+}
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif
index f4e434c1387ee551d969082f1e3db1b9e8b28fc4..50ed605fdfee44a902b9545313cee0928a185db5 100644 (file)
@@ -209,7 +209,7 @@ MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image,
     Generate difference image.
   */
   status=MagickTrue;
-  fuzz=GetMaxImageFuzz(image,reconstruct_image);
+  fuzz=GetFuzzyColorDistance(image,reconstruct_image);
   image_view=AcquireVirtualCacheView(image,exception);
   reconstruct_view=AcquireVirtualCacheView(reconstruct_image,exception);
   highlight_view=AcquireAuthenticCacheView(highlight_image,exception);
@@ -365,7 +365,7 @@ static MagickBooleanType GetAbsoluteDistortion(const Image *image,
     Compute the absolute difference in pixels between two images.
   */
   status=MagickTrue;
-  fuzz=GetMaxImageFuzz(image,reconstruct_image);
+  fuzz=GetFuzzyColorDistance(image,reconstruct_image);
   image_view=AcquireVirtualCacheView(image,exception);
   reconstruct_view=AcquireVirtualCacheView(reconstruct_image,exception);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
index 8c6ba124d27fc6b7d481b5862a0e0e458425a797..6b269a0cf70b2b90192925e923bca7f5f0715ac7 100644 (file)
@@ -6036,7 +6036,7 @@ MagickExport MagickBooleanType IsFuzzyEquivalencePixel(const Image *source,
     distance,
     scale;
 
-  fuzz=GetMaxImageFuzz(source,destination);
+  fuzz=GetFuzzyColorDistance(source,destination);
   scale=1.0;
   distance=0.0;
   if (source->alpha_trait != UndefinedPixelTrait)