]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 30 Jan 2014 23:09:31 +0000 (23:09 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 30 Jan 2014 23:09:31 +0000 (23:09 +0000)
MagickCore/compare.c

index ebb891641947004a000059851921cb899aab97a2..44d8f180a151c706d156fce725de7a64e84324ec 100644 (file)
@@ -1140,6 +1140,9 @@ static MagickBooleanType GetPerceptualHashDistortion(const Image *image,
   Image
     *phash_image;
 
+  MagickBooleanType
+    grayscale;
+
   register ssize_t
     i;
 
@@ -1188,6 +1191,9 @@ static MagickBooleanType GetPerceptualHashDistortion(const Image *image,
   image_moments=(ChannelMoments *) RelinquishMagickMemory(image_moments);
   reconstruct_moments=(ChannelMoments *) RelinquishMagickMemory(
     reconstruct_moments);
+  grayscale=(IsImageGray(image,exception) != MagickFalse) &&
+    (IsImageGray(reconstruct_image,exception) != MagickFalse) ? MagickTrue :
+    MagickFalse;
   if (grayscale != MagickFalse)
     return(MagickTrue);
   /*