]> granicus.if.org Git - imagemagick/commitdiff
Temporary set channel mask to the supplied mask.
authordirk <dirk@git.imagemagick.org>
Mon, 19 Sep 2016 20:18:59 +0000 (22:18 +0200)
committerdirk <dirk@git.imagemagick.org>
Mon, 19 Sep 2016 20:18:59 +0000 (22:18 +0200)
MagickWand/magick-image.c

index 738bf3714f60aecba468f437fd43d2b1b33124aa..c262fce08fe5edfe353f0bf5b1d871a53ca55df4 100644 (file)
@@ -11711,13 +11711,18 @@ WandExport MagickBooleanType MagickThresholdImageChannel(MagickWand *wand,
   MagickBooleanType
     status;
 
+  ChannelType
+    channel_mask;
+
   assert(wand != (MagickWand *) NULL);
   assert(wand->signature == MagickWandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
+  channel_mask=SetImageChannelMask(wand->images,channel);
   status=BilevelImage(wand->images,threshold,wand->exception);
+  (void) SetImageChannelMask(wand->images,channel_mask);
   return(status);
 }
 \f