From: cristy Date: Sat, 18 Jan 2014 15:58:31 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2830 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c97da4b779f2215ef0f06da52a8691e82fb847c2;p=imagemagick --- diff --git a/MagickCore/compare.c b/MagickCore/compare.c index 948961aee..5c15e5f06 100644 --- a/MagickCore/compare.c +++ b/MagickCore/compare.c @@ -42,6 +42,7 @@ */ #include "MagickCore/studio.h" #include "MagickCore/artifact.h" +#include "MagickCore/attribute.h" #include "MagickCore/cache-view.h" #include "MagickCore/channel.h" #include "MagickCore/client.h" @@ -1169,6 +1170,13 @@ static MagickBooleanType GetPerceptualHashDistortion(const Image *image, image_moments=(ChannelMoments *) RelinquishMagickMemory(image_moments); reconstruct_moments=(ChannelMoments *) RelinquishMagickMemory( reconstruct_moments); + if ((IsImageGray(blur_image,exception) != MagickFalse) || + (IsImageGray(blur_reconstruct,exception) != MagickFalse)) + { + blur_reconstruct=DestroyImage(blur_reconstruct); + blur_image=DestroyImage(blur_image); + return(MagickTrue); + } /* Compute perceptual hash in the HCLP colorspace. */