]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sun, 12 Feb 2017 16:37:31 +0000 (11:37 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sun, 12 Feb 2017 16:37:31 +0000 (11:37 -0500)
MagickCore/statistic.c

index 27660ea162cfcc4db4343f45fc86d4ed694c7bb6..41cc520888e1922b4da285fe1498dc27e7ad83ab 100644 (file)
@@ -1320,8 +1320,9 @@ static size_t GetImageChannels(const Image *image)
   {
     PixelChannel channel=GetPixelChannelChannel(image,i);
     PixelTrait traits=GetPixelChannelTraits(image,channel);
-    if ((traits & UpdatePixelTrait) != 0)
-      channels++;
+    if (traits == UndefinedPixelTrait)
+      continue;
+    channels++;
   }
   return((size_t) (channels == 0 ? 1 : channels));
 }