From 094941915d4e183d28cda5c015cba6a36779b66c Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Mon, 4 Sep 2017 20:51:32 +0200 Subject: [PATCH] Added charcoalChannel to Magick++. --- Magick++/lib/Image.cpp | 14 ++++++++++++++ Magick++/lib/Magick++/Image.h | 2 ++ 2 files changed, 16 insertions(+) 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 -- 2.40.0