From: Cristy <urban-warrior@imagemagick.org>
Date: Sat, 28 Jan 2017 23:41:37 +0000 (-0500)
Subject: ...
X-Git-Tag: 7.0.4-7~50
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6781acb6da0bfccd07e5f91f5793cdfc38672a0;p=imagemagick

...
---

diff --git a/coders/mpc.c b/coders/mpc.c
index 6f891acf2..8a2a3cdc0 100644
--- a/coders/mpc.c
+++ b/coders/mpc.c
@@ -557,6 +557,21 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 (void) SetImageProperty(image,keyword,options,exception);
                 break;
               }
+              case 'n':
+              case 'N':
+              {
+                if (LocaleCompare(keyword,"number-channels") == 0)
+                  {
+                    image->number_channels=StringToUnsignedLong(options);
+                    break;
+                  }
+                if (LocaleCompare(keyword,"number-meta-channels") == 0)
+                  {
+                    image->number_meta_channels=StringToUnsignedLong(options);
+                    break;
+                  }
+                break;
+              }
               case 'o':
               case 'O':
               {
@@ -1117,6 +1132,10 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image,
       CommandOptionToMnemonic(MagickPixelTraitOptions,(ssize_t)
       image->alpha_trait));
     (void) WriteBlobString(image,buffer);
+    (void) FormatLocaleString(buffer,MagickPathExtent,
+      "number-channels=%.20g  number-meta-channels=%.20g\n",
+      (double) image->number_channels,(double) image->number_meta_channels);
+    (void) WriteBlobString(image,buffer);
     (void) FormatLocaleString(buffer,MagickPathExtent,
       "columns=%.20g  rows=%.20g depth=%.20g\n",(double) image->columns,
       (double) image->rows,(double) image->depth);