summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Wey2012-10-20 20:23:30 +0200
committerMike Wey2012-10-20 20:23:30 +0200
commit8609311be56d983514a67f9a221bb580d08f7439 (patch)
treed7879241edbb36aeba39f9cbc2f9b4f73a87c197
parentad57d01f268a8afa4e5f437922e967e43c4ce1f7 (diff)
Add Image.solarize.
-rw-r--r--dmagick/Image.d24
1 files changed, 24 insertions, 0 deletions
diff --git a/dmagick/Image.d b/dmagick/Image.d
index 81496e4..d69b23b 100644
--- a/dmagick/Image.d
+++ b/dmagick/Image.d
@@ -2755,6 +2755,30 @@ class 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
* interpolation method.