]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/717
authorCristy <urban-warrior@imagemagick.org>
Fri, 1 Sep 2017 12:38:36 +0000 (08:38 -0400)
committerCristy <urban-warrior@imagemagick.org>
Fri, 1 Sep 2017 12:38:36 +0000 (08:38 -0400)
MagickCore/resize.c

index fd1caf89b3ba2470a3d3144e38c9bb09c2968b25..5f5b1c2bef599c17d71c186a04687a4076308a05 100644 (file)
@@ -3142,14 +3142,14 @@ MagickExport Image *SampleImage(const Image *image,const size_t columns,
           channel;
 
         PixelTrait
-          sample_traits,
+          image_traits,
           traits;
 
-        channel=GetPixelChannelChannel(image,i);
-        traits=GetPixelChannelTraits(image,channel);
-        sample_traits=GetPixelChannelTraits(sample_image,channel);
+        channel=GetPixelChannelChannel(sample_image,i);
+        traits=GetPixelChannelTraits(sample_image,channel);
+        image_traits=GetPixelChannelTraits(image,channel);
         if ((traits == UndefinedPixelTrait) ||
-            (sample_traits == UndefinedPixelTrait))
+            (image_traits == UndefinedPixelTrait))
           continue;
         SetPixelChannel(sample_image,channel,p[x_offset[x]*GetPixelChannels(
           image)+i],q);