]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sun, 12 Feb 2017 01:16:04 +0000 (20:16 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sun, 12 Feb 2017 01:16:04 +0000 (20:16 -0500)
ChangeLog
MagickCore/pixel.c

index 79cf1fe94c5316a58ba084f9fbe65e155f5e79d4..97db83a0c30032c3df96851e814f75db034a3deb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@
     https://blog.awm.jp/2017/02/09/imagemagick-en/).
   * Return unbiased standard deviation for image statistics (reference
     https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31377).
+  * Don't set update trait on alpha channel (private e-mail concerning
+    -levels-colors option).
 
 2017-02-04  7.0.4-7 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.4-7, GIT revision 19513:5783e57:20170204.
index 0a5f0c2ed849033fbcf775a27e41648f4dcec665..4d8c35bc84f4e15e79283c2d7d03d6c601beb112 100644 (file)
@@ -4321,8 +4321,8 @@ static void LogPixelChannels(const Image *image)
   register ssize_t
     i;
 
-  (void) LogMagickEvent(PixelEvent,GetMagickModule(),"%s[%.20g]",
-    image->filename,(double) image->number_channels);
+  (void) LogMagickEvent(PixelEvent,GetMagickModule(),"%s[%08x]",
+    image->filename,image->channel_mask);
   for (i=0; i < (ssize_t) image->number_channels; i++)
   {
     char
@@ -4466,7 +4466,7 @@ MagickExport void InitializePixelChannelMap(Image *image)
   image->number_channels=(size_t) n;
   if (image->debug != MagickFalse)
     LogPixelChannels(image);
-  SetImageChannelMask(image,image->channel_mask);
+  SetPixelChannelMask(image,image->channel_mask);
 }
 \f
 /*
@@ -6292,15 +6292,14 @@ MagickExport ChannelType SetPixelChannelMask(Image *image,
             SetPixelChannelTraits(image,channel,CopyPixelTrait);
             continue;
           }
-        SetPixelChannelTraits(image,channel,UpdatePixelTrait);
-        continue;
-      }
-    if (image->alpha_trait != UndefinedPixelTrait)
-      {
-        SetPixelChannelTraits(image,channel,(const PixelTrait)
-          (UpdatePixelTrait | BlendPixelTrait));
-        continue;
       }
+    else
+      if (image->alpha_trait != UndefinedPixelTrait)
+        {
+          SetPixelChannelTraits(image,channel,(const PixelTrait)
+            (UpdatePixelTrait | BlendPixelTrait));
+          continue;
+        }
     SetPixelChannelTraits(image,channel,UpdatePixelTrait);
   }
   if (image->storage_class == PseudoClass)