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

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