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

index b5095748c5dbbb37c926fb33b63d51f08268d164..cb8a3c83d6bcbb1534f3835ed5b575118350bd8c 100644 (file)
@@ -1138,8 +1138,7 @@ static MagickBooleanType GetPerceptualHashDistortion(const Image *image,
     *reconstruct_moments;
 
   Image
-    *phash_image,
-    *phash_reconstruct;
+    *phash_image;
 
   register ssize_t
     i;
@@ -1154,15 +1153,15 @@ static MagickBooleanType GetPerceptualHashDistortion(const Image *image,
   phash_image=DestroyImage(phash_image);
   if (image_moments == (ChannelMoments *) NULL)
     return(MagickFalse);
-  phash_reconstruct=PerceptualHashImage(reconstruct_image,
+  phash_image=PerceptualHashImage(reconstruct_image,
     reconstruct_image->colorspace,exception);
-  if (phash_reconstruct == (Image *) NULL)
+  if (phash_image == (Image *) NULL)
     {
       image_moments=(ChannelMoments *) RelinquishMagickMemory(image_moments);
       return(MagickFalse);
     }
-  reconstruct_moments=GetImageMoments(phash_reconstruct,exception);
-  phash_reconstruct=DestroyImage(phash_reconstruct);
+  reconstruct_moments=GetImageMoments(phash_image,exception);
+  phash_image=DestroyImage(phash_image);
   if (reconstruct_moments == (ChannelMoments *) NULL)
     {
       image_moments=(ChannelMoments *) RelinquishMagickMemory(image_moments);
@@ -1206,15 +1205,14 @@ static MagickBooleanType GetPerceptualHashDistortion(const Image *image,
   phash_image=DestroyImage(phash_image);
   if (image_moments == (ChannelMoments *) NULL)
     return(MagickFalse);
-  phash_reconstruct=PerceptualHashImage(reconstruct_image,HCLpColorspace,
-    exception);
-  if (phash_reconstruct == (Image *) NULL)
+  phash_image=PerceptualHashImage(reconstruct_image,HCLpColorspace,exception);
+  if (phash_image == (Image *) NULL)
     {
       image_moments=(ChannelMoments *) RelinquishMagickMemory(image_moments);
       return(MagickFalse);
     }
-  reconstruct_moments=GetImageMoments(phash_reconstruct,exception);
-  phash_reconstruct=DestroyImage(phash_reconstruct);
+  reconstruct_moments=GetImageMoments(phash_image,exception);
+  phash_image=DestroyImage(phash_image);
   if (reconstruct_moments == (ChannelMoments *) NULL)
     {
       image_moments=(ChannelMoments *) RelinquishMagickMemory(image_moments);