]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sat, 28 Jan 2017 23:41:37 +0000 (18:41 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 28 Jan 2017 23:41:37 +0000 (18:41 -0500)
coders/mpc.c

index 6f891acf2160b340b484fcf3075bd1c009d6eb6c..8a2a3cdc00a78137180d31ed99a36aebef792afb 100644 (file)
@@ -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);