]> granicus.if.org Git - imagemagick/commitdiff
Don't auto-level the alpha channel
authorCristy <urban-warrior@imagemagick.org>
Mon, 17 Aug 2015 22:55:47 +0000 (18:55 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 17 Aug 2015 22:55:47 +0000 (18:55 -0400)
MagickCore/histogram.c

index 20aa05f7d8a59f62e7accd23d099f963fe320758..c952dc6270d8dde98054563457384acb86c95939 100644 (file)
@@ -904,22 +904,10 @@ MagickExport MagickBooleanType MinMaxStretchImage(Image *image,
   MagickStatusType
     status;
 
-  status=MagickTrue;
-  if (image->channel_mask == DefaultChannels)
-    {
-      /*
-        Auto-level all channels equally.
-      */
-      (void) GetImageRange(image,&min,&max,exception);
-      min+=black;
-      max-=white;
-      if (fabs(min-max) >= MagickEpsilon)
-        status&=LevelImage(image,min,max,gamma,exception);
-      return(status != 0 ? MagickTrue : MagickFalse);
-    }
   /*
-    Auto-level each channel separately.
+    Auto-level each channel.
   */
+  status=MagickTrue;
   for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
   {
     ChannelType