summaryrefslogtreecommitdiff
path: root/dmagick/c/effect.d
diff options
context:
space:
mode:
authorMike Wey2011-09-11 11:38:32 +0200
committerMike Wey2011-09-11 11:38:32 +0200
commitb636368a771c4b7791244d308529bd9d44abfe99 (patch)
treef01f3352872dc183987cefb678c5d80a4284ff63 /dmagick/c/effect.d
parente60ae744596ca4e22ffa6097d65f50b2b5661f60 (diff)
Version the Headers so DMagick can be used with older versions of MagickCore.
Diffstat (limited to 'dmagick/c/effect.d')
-rw-r--r--dmagick/c/effect.d66
1 files changed, 53 insertions, 13 deletions
diff --git a/dmagick/c/effect.d b/dmagick/c/effect.d
index 2edebe9..16be2fd 100644
--- a/dmagick/c/effect.d
+++ b/dmagick/c/effect.d
@@ -3,6 +3,7 @@ module dmagick.c.effect;
import dmagick.c.exception;
import dmagick.c.image;
import dmagick.c.magickType;
+import dmagick.c.magickVersion;
import dmagick.c.morphology;
extern(C)
@@ -41,18 +42,35 @@ extern(C)
JPEGPreview
}
- enum StatisticType
+ mixin(
{
- UndefinedStatistic,
- GradientStatistic,
- MaximumStatistic,
- MeanStatistic,
- MedianStatistic,
- MinimumStatistic,
- ModeStatistic,
- NonpeakStatistic,
- StandardDeviationStatistic
- }
+ string types = "enum StatisticType
+ {
+ UndefinedStatistic,";
+
+ static if ( MagickLibVersion >= 0x670 )
+ {
+ types ~= "GradientStatistic,";
+ }
+
+ types ~= "
+ MaximumStatistic,
+ MeanStatistic,
+ MedianStatistic,
+ MinimumStatistic,
+ ModeStatistic,
+ NonpeakStatistic,";
+
+ static if ( MagickLibVersion >= 0x670 )
+ {
+ types ~= "StandardDeviationStatistic,";
+ }
+
+ types ~= "
+ }";
+
+ return types;
+ }());
Image* AdaptiveBlurImage(const(Image)*, const double, const double, ExceptionInfo*);
Image* AdaptiveBlurImageChannel(const(Image)*, const ChannelType, const double, const double, ExceptionInfo*);
@@ -69,19 +87,41 @@ extern(C)
Image* FilterImageChannel(const(Image)*, const ChannelType, const(KernelInfo)*, ExceptionInfo*);
Image* GaussianBlurImage(const(Image)*, const double, const double, ExceptionInfo*);
Image* GaussianBlurImageChannel(const(Image)*, const ChannelType, const double, const double, ExceptionInfo*);
+
+ static if ( MagickLibVersion < 0x669 )
+ {
+ Image* MedianFilterImage(const(Image)*, const double, ExceptionInfo*);
+ }
+
+ static if ( MagickLibVersion == 0x668 )
+ {
+ Image* ModeImage(const(Image)*, const double, ExceptionInfo*);
+ }
+
Image* MotionBlurImage(const(Image)*, const double, const double, const double, ExceptionInfo*);
Image* MotionBlurImageChannel(const(Image)*, const ChannelType, const double, const double, const double, ExceptionInfo*);
Image* PreviewImage(const(Image)*, const PreviewType, ExceptionInfo*);
Image* RadialBlurImage(const(Image)*, const double, ExceptionInfo*);
Image* RadialBlurImageChannel(const(Image)*, const ChannelType, const double, ExceptionInfo*);
+
+ static if ( MagickLibVersion < 0x669 )
+ {
+ Image* ReduceNoiseImage(const(Image)*, const double, ExceptionInfo*);
+ }
+
Image* SelectiveBlurImage(const(Image)*, const double, const double, const double, ExceptionInfo*);
Image* SelectiveBlurImageChannel(const(Image)*, const ChannelType, const double, const double, const double, ExceptionInfo*);
Image* ShadeImage(const(Image)*, const MagickBooleanType, const double, const double, ExceptionInfo*);
Image* SharpenImage(const(Image)*, const double, const double, ExceptionInfo*);
Image* SharpenImageChannel(const(Image)*, const ChannelType ,const double, const double, ExceptionInfo*);
Image* SpreadImage(const(Image)*, const double, ExceptionInfo*);
- Image* StatisticImage(const(Image)*, const StatisticType, const size_t, const size_t, ExceptionInfo*);
- Image* StatisticImageChannel(const(Image)*, const ChannelType, const StatisticType, const size_t, const size_t, ExceptionInfo*);
+
+ static if ( MagickLibVersion >= 0x669 )
+ {
+ Image* StatisticImage(const(Image)*, const StatisticType, const size_t, const size_t, ExceptionInfo*);
+ Image* StatisticImageChannel(const(Image)*, const ChannelType, const StatisticType, const size_t, const size_t, ExceptionInfo*);
+ }
+
Image* UnsharpMaskImage(const(Image)*, const double, const double, const double, const double, ExceptionInfo*);
Image* UnsharpMaskImageChannel(const(Image)*, const ChannelType, const double, const double, const double, const double, ExceptionInfo*);
}