From 8609311be56d983514a67f9a221bb580d08f7439 Mon Sep 17 00:00:00 2001 From: Mike Wey Date: Sat, 20 Oct 2012 20:23:30 +0200 Subject: Add Image.solarize. --- dmagick/Image.d | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dmagick/Image.d b/dmagick/Image.d index 81496e4..d69b23b 100644 --- a/dmagick/Image.d +++ b/dmagick/Image.d @@ -2754,6 +2754,30 @@ class Image imageRef = ImageRef(image); } + /** + * Applies a special effect to the image similar to the effect achieved + * in a photo darkroom by selectively exposing areas of photo sensitive + * paper to light. + * + * Params: + * threshold = The extent of the solarization. + * channel = The channels to adjust. Anything other than + * ChannelType.DefaultChannels requires ImageMagick 6.8.0 + * ot higher. + */ + void solarize(Quantum threshold, ChannelType channel = ChannelType.DefaultChannels) + { + static if ( is(typeof(SolarizeImageChannel)) ) + { + SolarizeImageChannel(imageRef, channel, threshold, DMagickExceptionInfo()); + } + else + { + SolarizeImage(imageRef, threshold); + DMagickException.throwException(&(imageRef.exception)); + } + } + /** * Fills the image with the specified color or colors, starting at * the x,y coordinates associated with the color and using the specified -- cgit v1.2.3