From: Dirk Lemstra Date: Mon, 4 Sep 2017 18:51:32 +0000 (+0200) Subject: Added charcoalChannel to Magick++. X-Git-Tag: 7.0.7-1~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=094941915d4e183d28cda5c015cba6a36779b66c;p=imagemagick Added charcoalChannel to Magick++. --- diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index d34727734..426a02263 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -2196,6 +2196,20 @@ void Magick::Image::charcoal(const double radius_,const double sigma_) ThrowImageException; } +void Magick::Image::charcoalChannel(const ChannelType channel_, + const double radius_,const double sigma_) +{ + MagickCore::Image + *newImage; + + GetPPException; + GetAndSetPPChannelMask(channel_); + newImage=CharcoalImage(image(),radius_,sigma_,exceptionInfo); + RestorePPChannelMask; + replaceImage(newImage); + ThrowImageException; +} + void Magick::Image::chop(const Geometry &geometry_) { MagickCore::Image diff --git a/Magick++/lib/Magick++/Image.h b/Magick++/lib/Magick++/Image.h index 2fb8c38f3..3ca971202 100644 --- a/Magick++/lib/Magick++/Image.h +++ b/Magick++/lib/Magick++/Image.h @@ -691,6 +691,8 @@ namespace Magick // pixels, not counting the center pixel. The sigma_ parameter // specifies the standard deviation of the Laplacian, in pixels. void charcoal(const double radius_=0.0,const double sigma_=1.0); + void charcoalChannel(const ChannelType channel_,const double radius_=0.0, + const double sigma_=1.0); // Chop image (remove vertical or horizontal subregion of image) // FIXME: describe how geometry argument is used to select either