]> granicus.if.org Git - imagemagick/commitdiff
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31377
authorCristy <urban-warrior@imagemagick.org>
Thu, 23 Feb 2017 23:49:01 +0000 (18:49 -0500)
committerCristy <urban-warrior@imagemagick.org>
Thu, 23 Feb 2017 23:49:01 +0000 (18:49 -0500)
MagickCore/cache.c
MagickCore/statistic.c

index 6730b5d7ae942384695a91b3a2eeba93e2f03f80..1e79ede50f5f5c836ac10d40ccf79ff4d4bfcaaf 100644 (file)
@@ -3461,7 +3461,7 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
   assert(cache_info->signature == MagickCoreSignature);
   if ((AcquireMagickResource(WidthResource,image->columns) == MagickFalse) ||
       (AcquireMagickResource(HeightResource,image->rows) == MagickFalse))
-    ThrowBinaryException(ResourceLimitError,"WidthOrHeightExceedsLimit",
+    ThrowBinaryException(IamgeError,"WidthOrHeightExceedsLimit",
       image->filename);
   source_info=(*cache_info);
   source_info.file=(-1);
index aab5dd62155d521701054987e456b66bc4594955..5cde9930b200920791176286c0cfc0ed2375a592 100644 (file)
@@ -1961,6 +1961,8 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image,
         PixelTrait traits=GetPixelChannelTraits(image,channel);
         if (traits == UndefinedPixelTrait)
           continue;
+        if ((traits & UpdatePixelTrait) == 0)
+          continue;
         if (channel_statistics[channel].depth != MAGICKCORE_QUANTUM_DEPTH)
           {
             depth=channel_statistics[channel].depth;