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

index c7ae0c03413043bad724ea7b86d7ffeefb0dc590..442f4a2b40d35e45cb15a8600e1f84415cdfac81 100644 (file)
@@ -4315,108 +4315,6 @@ MagickExport MagickBooleanType ImportImagePixels(Image *image,const ssize_t x,
 %    o image: the image.
 %
 */
-
-static void LogPixelChannels(const Image *image)
-{
-  register ssize_t
-    i;
-
-  (void) LogMagickEvent(PixelEvent,GetMagickModule(),"%s[%08x]",
-    image->filename,image->channel_mask);
-  for (i=0; i < (ssize_t) image->number_channels; i++)
-  {
-    char
-      channel_name[MagickPathExtent],
-      traits[MagickPathExtent];
-
-    const char
-      *name;
-
-    PixelChannel
-      channel;
-
-    channel=GetPixelChannelChannel(image,i);
-    switch (channel)
-    {
-      case RedPixelChannel:
-      {
-        name="red";
-        if (image->colorspace == CMYKColorspace)
-          name="cyan";
-        if (image->colorspace == GRAYColorspace)
-          name="gray";
-        break;
-      }
-      case GreenPixelChannel:
-      {
-        name="green";
-        if (image->colorspace == CMYKColorspace)
-          name="magenta";
-        break;
-      }
-      case BluePixelChannel:
-      {
-        name="blue";
-        if (image->colorspace == CMYKColorspace)
-          name="yellow";
-        break;
-      }
-      case BlackPixelChannel:
-      {
-        name="black";
-        if (image->storage_class == PseudoClass)
-          name="index";
-        break;
-      }
-      case IndexPixelChannel:
-      {
-        name="index";
-        break;
-      }
-      case AlphaPixelChannel:
-      {
-        name="alpha";
-        break;
-      }
-      case ReadMaskPixelChannel:
-      {
-        name="read-mask";
-        break;
-      }
-      case WriteMaskPixelChannel:
-      {
-        name="write-mask";
-        break;
-      }
-      case MetaPixelChannel:
-      {
-        name="meta";
-        break;
-      }
-      default:
-        name="undefined";
-    }
-    if (image->colorspace ==  UndefinedColorspace)
-      {
-        (void) FormatLocaleString(channel_name,MagickPathExtent,"%.20g",
-          (double) channel);
-        name=(const char *) channel_name;
-      }
-    *traits='\0';
-    if ((GetPixelChannelTraits(image,channel) & UpdatePixelTrait) != 0)
-      (void) ConcatenateMagickString(traits,"update,",MagickPathExtent);
-    if ((GetPixelChannelTraits(image,channel) & BlendPixelTrait) != 0)
-      (void) ConcatenateMagickString(traits,"blend,",MagickPathExtent);
-    if ((GetPixelChannelTraits(image,channel) & CopyPixelTrait) != 0)
-      (void) ConcatenateMagickString(traits,"copy,",MagickPathExtent);
-    if (*traits == '\0')
-      (void) ConcatenateMagickString(traits,"undefined,",MagickPathExtent);
-    traits[strlen(traits)-1]='\0';
-    (void) LogMagickEvent(PixelEvent,GetMagickModule(),"  %.20g: %s (%s)",
-      (double) i,name,traits);
-  }
-}
-
 MagickExport void InitializePixelChannelMap(Image *image)
 {
   PixelTrait
@@ -6257,6 +6155,108 @@ MagickExport MagickBooleanType IsFuzzyEquivalencePixelInfo(const PixelInfo *p,
 %    o channel_mask: the channel mask.
 %
 */
+
+static void LogPixelChannels(const Image *image)
+{
+  register ssize_t
+    i;
+
+  (void) LogMagickEvent(PixelEvent,GetMagickModule(),"%s[%08x]",
+    image->filename,image->channel_mask);
+  for (i=0; i < (ssize_t) image->number_channels; i++)
+  {
+    char
+      channel_name[MagickPathExtent],
+      traits[MagickPathExtent];
+
+    const char
+      *name;
+
+    PixelChannel
+      channel;
+
+    channel=GetPixelChannelChannel(image,i);
+    switch (channel)
+    {
+      case RedPixelChannel:
+      {
+        name="red";
+        if (image->colorspace == CMYKColorspace)
+          name="cyan";
+        if (image->colorspace == GRAYColorspace)
+          name="gray";
+        break;
+      }
+      case GreenPixelChannel:
+      {
+        name="green";
+        if (image->colorspace == CMYKColorspace)
+          name="magenta";
+        break;
+      }
+      case BluePixelChannel:
+      {
+        name="blue";
+        if (image->colorspace == CMYKColorspace)
+          name="yellow";
+        break;
+      }
+      case BlackPixelChannel:
+      {
+        name="black";
+        if (image->storage_class == PseudoClass)
+          name="index";
+        break;
+      }
+      case IndexPixelChannel:
+      {
+        name="index";
+        break;
+      }
+      case AlphaPixelChannel:
+      {
+        name="alpha";
+        break;
+      }
+      case ReadMaskPixelChannel:
+      {
+        name="read-mask";
+        break;
+      }
+      case WriteMaskPixelChannel:
+      {
+        name="write-mask";
+        break;
+      }
+      case MetaPixelChannel:
+      {
+        name="meta";
+        break;
+      }
+      default:
+        name="undefined";
+    }
+    if (image->colorspace ==  UndefinedColorspace)
+      {
+        (void) FormatLocaleString(channel_name,MagickPathExtent,"%.20g",
+          (double) channel);
+        name=(const char *) channel_name;
+      }
+    *traits='\0';
+    if ((GetPixelChannelTraits(image,channel) & UpdatePixelTrait) != 0)
+      (void) ConcatenateMagickString(traits,"update,",MagickPathExtent);
+    if ((GetPixelChannelTraits(image,channel) & BlendPixelTrait) != 0)
+      (void) ConcatenateMagickString(traits,"blend,",MagickPathExtent);
+    if ((GetPixelChannelTraits(image,channel) & CopyPixelTrait) != 0)
+      (void) ConcatenateMagickString(traits,"copy,",MagickPathExtent);
+    if (*traits == '\0')
+      (void) ConcatenateMagickString(traits,"undefined,",MagickPathExtent);
+    traits[strlen(traits)-1]='\0';
+    (void) LogMagickEvent(PixelEvent,GetMagickModule(),"  %.20g: %s (%s)",
+      (double) i,name,traits);
+  }
+}
+
 MagickExport ChannelType SetPixelChannelMask(Image *image,
   const ChannelType channel_mask)
 {