]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Fri, 3 Feb 2017 16:53:17 +0000 (11:53 -0500)
committerCristy <urban-warrior@imagemagick.org>
Fri, 3 Feb 2017 16:53:17 +0000 (11:53 -0500)
MagickCore/channel.c

index 514467a21c5288099aea1dbcad917cd0f51a7891..0f165e0b0e372016853085a8e9292898d8822ec6 100644 (file)
@@ -281,8 +281,6 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
           *canvas;
 
         (void) SetPixelChannelMask(destination_image,channel_mask);
-        if ((channel_op == ExtractChannelOp) && (channels == 1))
-          (void) SetImageColorspace(destination_image,GRAYColorspace,exception);
         canvas=CloneImage(source_image,0,0,MagickTrue,exception);
         if (canvas == (Image *) NULL)
           {
@@ -380,9 +378,6 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
             break;
         }
         channel_mask=(ChannelType) (channel_mask | ParseChannelOption(token));
-        if (((channels >= 1)  || (destination_channel >= 1)) &&
-            (IsGrayColorspace(destination_image->colorspace) != MagickFalse))
-          (void) SetImageColorspace(destination_image,sRGBColorspace,exception);
         GetNextToken(p,&p,MagickPathExtent,token);
         break;
       }
@@ -425,8 +420,6 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
       break;
   }
   (void) SetPixelChannelMask(destination_image,channel_mask);
-  if ((channel_op == ExtractChannelOp) && (channels == 1))
-    (void) SetImageColorspace(destination_image,GRAYColorspace,exception);
   return(GetFirstImageInList(destination_image));
 }
 \f