]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Wed, 1 Feb 2017 11:25:48 +0000 (06:25 -0500)
committerCristy <urban-warrior@imagemagick.org>
Wed, 1 Feb 2017 11:25:48 +0000 (06:25 -0500)
MagickCore/channel.c

index 56816ca5f81d443508f6f2469f4d62e1c7f41143..c46b8125532bee58cdda2e746dc7fc0e22ee842a 100644 (file)
@@ -334,7 +334,6 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
       case ExchangeChannelOp:
       case TransferChannelOp:
       {
-        destination_channel=(PixelChannel) i;
         if (channel_op == AssignChannelOp)
           pixel=StringToDoubleInterval(token,(double) QuantumRange+1.0);
         else
@@ -348,6 +347,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
                 return(destination_image);
               }
           }
+        destination_channel=(PixelChannel) i;
         switch (destination_channel)
         {
           case RedPixelChannel: