]> granicus.if.org Git - imagemagick/commitdiff
Added charcoalChannel to Magick++.
authorDirk Lemstra <dirk@git.imagemagick.org>
Mon, 4 Sep 2017 18:51:32 +0000 (20:51 +0200)
committerDirk Lemstra <dirk@git.imagemagick.org>
Mon, 4 Sep 2017 18:51:32 +0000 (20:51 +0200)
Magick++/lib/Image.cpp
Magick++/lib/Magick++/Image.h

index d3472773417c35e4ccc7b7ad6ecf86a6a6c5ba72..426a02263f62660769b85dd5104a0fa171d97639 100644 (file)
@@ -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
index 2fb8c38f30a98c2f17126f378a32a47bba1304b4..3ca9712025e6a50195ff0d01b8a95bebbe86e504 100644 (file)
@@ -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