diff options
| -rw-r--r-- | dmagick/c/cacheView.d | 68 | ||||
| -rw-r--r-- | dmagick/c/constitute.d | 19 | ||||
| -rw-r--r-- | dmagick/c/distort.d | 33 | ||||
| -rw-r--r-- | dmagick/c/effect.d | 73 |
4 files changed, 159 insertions, 34 deletions
diff --git a/dmagick/c/cacheView.d b/dmagick/c/cacheView.d index fb94456..24e1dd0 100644 --- a/dmagick/c/cacheView.d +++ b/dmagick/c/cacheView.d @@ -11,25 +11,93 @@ alias ptrdiff_t ssize_t; extern(C) { + /** + * Specify contents of virtual pixels. + */ enum VirtualPixelMethod { + /** */ UndefinedVirtualPixelMethod, + + /** + * The area surrounding the image is the background color. + */ BackgroundVirtualPixelMethod, + + /** */ ConstantVirtualPixelMethod, + + /** + * Non-random 32x32 dithered pattern. + */ DitherVirtualPixelMethod, + + /** + * Extend the edge pixel toward infinity. + */ EdgeVirtualPixelMethod, + + /** + * Mirror tile the image. + */ MirrorVirtualPixelMethod, + + /** + * Choose a random pixel from the image. + */ RandomVirtualPixelMethod, + + /** + * Tile the image. + */ TileVirtualPixelMethod, + + /** + * The area surrounding the image is transparent blackness. + */ TransparentVirtualPixelMethod, + + /** */ MaskVirtualPixelMethod, + + /** + * The area surrounding the image is black. + */ BlackVirtualPixelMethod, + + /** + * The area surrounding the image is gray. + */ GrayVirtualPixelMethod, + + /** + * The area surrounding the image is white. + */ WhiteVirtualPixelMethod, + + /** + * Horizontally tile the image, background color above/below. + */ HorizontalTileVirtualPixelMethod, + + /** + * Vertically tile the image, sides are background color. + */ VerticalTileVirtualPixelMethod, + + /** + * Horizontally tile the image and replicate the side edge pixels. + */ HorizontalTileEdgeVirtualPixelMethod, + + /** + * Vertically tile the image and replicate the side edge pixels. + */ VerticalTileEdgeVirtualPixelMethod, + + /** + * Alternate squares with image and background color. + */ CheckerTileVirtualPixelMethod } diff --git a/dmagick/c/constitute.d b/dmagick/c/constitute.d index e23e9db..d8bbcb5 100644 --- a/dmagick/c/constitute.d +++ b/dmagick/c/constitute.d @@ -6,16 +6,19 @@ import dmagick.c.magickType; extern(C) { + /** + * The size of a pixel component. + */ enum StorageType { - UndefinedPixel, - CharPixel, - DoublePixel, - FloatPixel, - IntegerPixel, - LongPixel, - QuantumPixel, - ShortPixel + UndefinedPixel, /// + CharPixel, /// ditto + DoublePixel, /// ditto + FloatPixel, /// ditto + IntegerPixel, /// ditto + LongPixel, /// ditto + QuantumPixel, /// ditto + ShortPixel /// ditto } Image* ConstituteImage(const size_t, const size_t, const(char)*, const StorageType, const(void)*, ExceptionInfo*); diff --git a/dmagick/c/distort.d b/dmagick/c/distort.d index 371d83d..6246ed8 100644 --- a/dmagick/c/distort.d +++ b/dmagick/c/distort.d @@ -277,15 +277,48 @@ extern(C) }()); } + /** + * Determines how to fill intervening colors. + */ enum SparseColorMethod { + /** */ UndefinedColorInterpolate = DistortImageMethod.UndefinedDistortion, + + /** + * three point triangle of color given 3 points. Giving only 2 points + * will form a linear gradient between those points. The gradient + * generated extends beyond the triangle created by those 3 points. + */ BarycentricColorInterpolate = DistortImageMethod.AffineDistortion, + + /** + * Like barycentric but for 4 points. Less than 4 points fall back + * to barycentric. + */ BilinearColorInterpolate = DistortImageMethod.BilinearReverseDistortion, + + /** */ PolynomialColorInterpolate = DistortImageMethod.PolynomialDistortion, + + /** + * Colors points biased on the ratio of inverse distance squared. + * Generating spots of color in a sea of the average of colors. + */ ShepardsColorInterpolate = DistortImageMethod.ShepardsDistortion, + /** + * Simply map each pixel to the to nearest color point given. + * The result are polygonal cells of solid color. + */ VoronoiColorInterpolate = DistortImageMethod.SentinelDistortion, + + /** + * Colors points biased on the ratio of inverse distance. + * This generates sharper points of color rather than rounded spots + * of ShepardsColorInterpolate Generating spots of color in a sea + * of the average of colors. + */ InverseColorInterpolate } diff --git a/dmagick/c/effect.d b/dmagick/c/effect.d index 95795c3..f70ae63 100644 --- a/dmagick/c/effect.d +++ b/dmagick/c/effect.d @@ -45,35 +45,56 @@ extern(C) JPEGPreview /// ditto } - mixin( + version(D_Ddoc) { - string types = "enum StatisticType + /** + * The statistic method to apply. + */ + enum StatisticType { - UndefinedStatistic,"; - - static if ( MagickLibVersion >= 0x670 ) - { - types ~= "GradientStatistic,"; - } - - types ~= " - MaximumStatistic, - MeanStatistic, - MedianStatistic, - MinimumStatistic, - ModeStatistic, - NonpeakStatistic,"; - - static if ( MagickLibVersion >= 0x670 ) + 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 { - types ~= "StandardDeviationStatistic,"; - } - - types ~= " - }"; - - return types; - }()); + 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*); |
