From b6781acb6da0bfccd07e5f91f5793cdfc38672a0 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 28 Jan 2017 18:41:37 -0500 Subject: [PATCH] ... --- coders/mpc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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); -- 2.40.0