summaryrefslogtreecommitdiff
path: root/dmagick/c/statistic.d
diff options
context:
space:
mode:
Diffstat (limited to 'dmagick/c/statistic.d')
-rw-r--r--dmagick/c/statistic.d57
1 files changed, 57 insertions, 0 deletions
diff --git a/dmagick/c/statistic.d b/dmagick/c/statistic.d
index cf0703c..ff9d37d 100644
--- a/dmagick/c/statistic.d
+++ b/dmagick/c/statistic.d
@@ -92,6 +92,57 @@ extern(C)
ArctanFunction /// ditto
}
+ version(D_Ddoc)
+ {
+ /**
+ * The statistic method to apply.
+ */
+ enum StatisticType
+ {
+ UndefinedStatistic, ///
+ GradientStatistic, /// Maximum difference in area.
+ MaximumStatistic, /// Maximum value per channel in neighborhood.
+ MeanStatistic, /// Average value per channel in neighborhood.
+ MedianStatistic, /// Median value per channel in neighborhood.
+ MinimumStatistic, /// Minimum value per channel in neighborhood.
+ ModeStatistic, /// Mode (most frequent) value per channel in neighborhood.
+ NonpeakStatistic, /// Value just before or after the median value per channel in neighborhood.
+ StandardDeviationStatistic ///
+ }
+ }
+ else
+ {
+ mixin(
+ {
+ 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;
+ }());
+ }
+
ChannelStatistics* GetImageChannelStatistics(const(Image)*, ExceptionInfo*);
static if ( MagickLibVersion < 0x661 )
@@ -104,6 +155,12 @@ extern(C)
Image* EvaluateImages(const(Image)*, const MagickEvaluateOperator, 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*);
+ }
+
MagickBooleanType EvaluateImage(Image*, const MagickEvaluateOperator, const double, ExceptionInfo*);
MagickBooleanType EvaluateImageChannel(Image*, const ChannelType, const MagickEvaluateOperator, const double, ExceptionInfo*);
MagickBooleanType FunctionImage(Image*, const MagickFunction, const size_t, const(double)*, ExceptionInfo*);