diff options
| -rw-r--r-- | dmagick/c/compress.d | 91 | ||||
| -rw-r--r-- | dmagick/c/effect.d | 63 | ||||
| -rw-r--r-- | dmagick/c/fx.d | 19 | ||||
| -rw-r--r-- | dmagick/c/layer.d | 24 | ||||
| -rw-r--r-- | dmagick/c/magickType.d | 47 | ||||
| -rw-r--r-- | dmagick/c/pixel.d | 21 | ||||
| -rw-r--r-- | dmagick/c/profile.d | 36 | ||||
| -rw-r--r-- | dmagick/c/quantum.d | 9 | ||||
| -rw-r--r-- | dmagick/c/resample.d | 70 | ||||
| -rw-r--r-- | dmagick/c/statistic.d | 81 |
10 files changed, 336 insertions, 125 deletions
diff --git a/dmagick/c/compress.d b/dmagick/c/compress.d index 40b1446..4e0856a 100644 --- a/dmagick/c/compress.d +++ b/dmagick/c/compress.d @@ -5,30 +5,113 @@ import dmagick.c.magickType; extern(C) { + /** + * Express the desired compression type when encoding an image. Be aware + * that most image types only support a sub-set of the available + * compression types. If the compression type specified is incompatible + * with the image, ImageMagick selects a compression type compatible + * with the image type. + */ enum CompressionType { + /** */ UndefinedCompression, + + /** + * The default for most formats. + */ NoCompression, + + /** + * BZip (Burrows-Wheeler block-sorting text compression algorithm + * and Huffman coding) as used by bzip2 utilities + */ BZipCompression, + + /** */ DXT1Compression, + + /** */ DXT3Compression, + + /** */ DXT5Compression, + + /** + * CCITT Group 3 FAX compression. + */ FaxCompression, + + /** + * CCITT Group 4 FAX compression (used only for TIFF). + */ Group4Compression, + + /** + * JPEG compression. + * + * See_Also: $(LINK2 http://www.faqs.org/faqs/jpeg-faq/part1/, + * The JPEG image compression FAQ). + */ JPEGCompression, - JPEG2000Compression, /* ISO/IEC std 15444-1 */ + + /** + * JPEG2000 compression for compressed PDF images. + * + * ISO/IEC std 15444-1 + */ + JPEG2000Compression, + + /** */ LosslessJPEGCompression, + + /** + * Lempel-Ziv-Welch (LZW) compression. + */ LZWCompression, + + /** + * Run-length encoding. + * + * See_Also: $(LINK2 http://en.wikipedia.org/wiki/Run_length_encoding, + * Wikipedia). + */ RLECompression, + + /** + * Lempel-Ziv compression (LZ77) as used in PKZIP and GNU gzip. + */ ZipCompression, + + /** */ ZipSCompression, + + /** */ PizCompression, + + /** */ Pxr24Compression, + + /** */ B44Compression, + + /** */ B44ACompression, - LZMACompression, /* Lempel-Ziv-Markov chain algorithm */ - JBIG1Compression, /* ISO/IEC std 11544 / ITU-T rec T.82 */ - JBIG2Compression /* ISO/IEC std 14492 / ITU-T rec T.88 */ + + /** + * Lempel-Ziv-Markov chain algorithm + */ + LZMACompression, + + /** + * ISO/IEC std 11544 / ITU-T rec T.82 + */ + JBIG1Compression, + + /** + * ISO/IEC std 14492 / ITU-T rec T.88 + */ + JBIG2Compression } struct Ascii85Info {} diff --git a/dmagick/c/effect.d b/dmagick/c/effect.d index 16be2fd..95795c3 100644 --- a/dmagick/c/effect.d +++ b/dmagick/c/effect.d @@ -8,38 +8,41 @@ import dmagick.c.morphology; extern(C) { + /** + * Image preview type. + */ enum PreviewType { - UndefinedPreview, - RotatePreview, - ShearPreview, - RollPreview, - HuePreview, - SaturationPreview, - BrightnessPreview, - GammaPreview, - SpiffPreview, - DullPreview, - GrayscalePreview, - QuantizePreview, - DespecklePreview, - ReduceNoisePreview, - AddNoisePreview, - SharpenPreview, - BlurPreview, - ThresholdPreview, - EdgeDetectPreview, - SpreadPreview, - SolarizePreview, - ShadePreview, - RaisePreview, - SegmentPreview, - SwirlPreview, - ImplodePreview, - WavePreview, - OilPaintPreview, - CharcoalDrawingPreview, - JPEGPreview + UndefinedPreview, /// + RotatePreview, /// ditto + ShearPreview, /// ditto + RollPreview, /// ditto + HuePreview, /// ditto + SaturationPreview, /// ditto + BrightnessPreview, /// ditto + GammaPreview, /// ditto + SpiffPreview, /// ditto + DullPreview, /// ditto + GrayscalePreview, /// ditto + QuantizePreview, /// ditto + DespecklePreview, /// ditto + ReduceNoisePreview, /// ditto + AddNoisePreview, /// ditto + SharpenPreview, /// ditto + BlurPreview, /// ditto + ThresholdPreview, /// ditto + EdgeDetectPreview, /// ditto + SpreadPreview, /// ditto + SolarizePreview, /// ditto + ShadePreview, /// ditto + RaisePreview, /// ditto + SegmentPreview, /// ditto + SwirlPreview, /// ditto + ImplodePreview, /// ditto + WavePreview, /// ditto + OilPaintPreview, /// ditto + CharcoalDrawingPreview, /// ditto + JPEGPreview /// ditto } mixin( diff --git a/dmagick/c/fx.d b/dmagick/c/fx.d index ac77737..2da4806 100644 --- a/dmagick/c/fx.d +++ b/dmagick/c/fx.d @@ -12,16 +12,19 @@ alias ptrdiff_t ssize_t; extern(C) { + /** + * Select the type of noise to be added to the image. + */ enum NoiseType { - UndefinedNoise, - UniformNoise, - GaussianNoise, - MultiplicativeGaussianNoise, - ImpulseNoise, - LaplacianNoise, - PoissonNoise, - RandomNoise + UndefinedNoise, /// + UniformNoise, /// ditto + GaussianNoise, /// ditto + MultiplicativeGaussianNoise, /// ditto + ImpulseNoise, /// ditto + LaplacianNoise, /// ditto + PoissonNoise, /// ditto + RandomNoise /// ditto } Image* AddNoiseImage(const(Image)*, const NoiseType, ExceptionInfo*); diff --git a/dmagick/c/layer.d b/dmagick/c/layer.d index 8928453..a4dae67 100644 --- a/dmagick/c/layer.d +++ b/dmagick/c/layer.d @@ -8,12 +8,36 @@ alias ptrdiff_t ssize_t; extern(C) { + /** + * The dispose method used for GIF animations. + * + * See_Also: $(LINK2 http://www.imagemagick.org/Usage/anim_basics/#dispose, + * Frame Disposal Methods) in the Examples of ImageMagick Usage. + */ enum DisposeType { + /** */ UnrecognizedDispose, + + /** + * No disposal specified. + */ UndefinedDispose = 0, + + /** + * Do not dispose between frames. + */ NoneDispose = 1, + + /** + * Overwrite the image area with the background color. + */ BackgroundDispose = 2, + + /** + * Overwrite the image area with what was there prior + * to rendering the image. + */ PreviousDispose = 3 } diff --git a/dmagick/c/magickType.d b/dmagick/c/magickType.d index 7a8b845..32b2e5f 100644 --- a/dmagick/c/magickType.d +++ b/dmagick/c/magickType.d @@ -6,46 +6,78 @@ extern (C) { version(Quantum8) { + /** + * Quantum is an alias for the smallest integer that can hold + * a pixel channel. + */ alias ubyte Quantum; alias double MagickRealType; - enum MAGICKCORE_QUANTUM_DEPTH = 8; + /** + * The largest value that fits in a Quantum, This is the same + * as Quantum.max except when the Quantum dept is 64 bits. + */ enum QuantumRange = Quantum.max; + enum MAGICKCORE_QUANTUM_DEPTH = 8; enum MaxColormapSize = 256; enum MagickEpsilon = 1.0e-6; enum MagickHuge = 1.0e6; } else version(Quantum32) { + /** + * Quantum is an alias for the smallest integer that can hold + * a pixel channel. + */ alias uint Quantum; alias double MagickRealType; - enum MAGICKCORE_QUANTUM_DEPTH = 32; + /** + * The largest value that fits in a Quantum, This is the same + * as Quantum.max except when the Quantum dept is 64 bits. + */ enum QuantumRange = Quantum.max; + enum MAGICKCORE_QUANTUM_DEPTH = 32; enum MaxColormapSize = 65536; enum MagickEpsilon = 1.0e-10; enum MagickHuge = 1.0e12; } else version(Quantum64) { + /** + * Quantum is an alias for the smallest integer that can hold + * a pixel channel. + */ alias double Quantum; //real seems to be the same size as long double for //dmc and dmd on windows and for dmd and gcc on linux. alias real MagickRealType; - enum MAGICKCORE_QUANTUM_DEPTH = 64; + /** + * The largest value that fits in a Quantum, This is the same + * as Quantum.max except when the Quantum dept is 64 bits. + */ enum QuantumRange = 18446744073709551615.0; + enum MAGICKCORE_QUANTUM_DEPTH = 64; enum MaxColormapSize = 65536; enum MagickEpsilon = 1.0e-10; enum MagickHuge = 1.0e12; } else { + /** + * Quantum is an alias for the smallest integer that can hold + * a pixel channel. + */ alias ushort Quantum; alias double MagickRealType; - enum MAGICKCORE_QUANTUM_DEPTH = 16; + /** + * The largest value that fits in a Quantum, This is the same + * as Quantum.max except when the Quantum dept is 64 bits. + */ enum QuantumRange = Quantum.max; + enum MAGICKCORE_QUANTUM_DEPTH = 16; enum MaxColormapSize = 65536; enum MagickEpsilon = 1.0e-10; enum MagickHuge = 1.0e12; @@ -57,13 +89,14 @@ extern (C) alias int MagickBooleanType; alias MagickSizeType QuantumAny; - alias QuantumRange TransparentOpacity; alias MaxColormapSize MaxMap; + enum MaxTextExtent = 4096; + /// The Quantum depth ImageMagick / DMagick is compiled with. alias MAGICKCORE_QUANTUM_DEPTH MagickQuantumDepth; - enum MaxTextExtent = 4096; - enum OpaqueOpacity = 0; + alias QuantumRange TransparentOpacity; /// Fully transparent Quantum. + enum OpaqueOpacity = 0; /// Fully opaque Quantum. version(D_Ddoc) { diff --git a/dmagick/c/pixel.d b/dmagick/c/pixel.d index 3ceb9e2..dda87d3 100644 --- a/dmagick/c/pixel.d +++ b/dmagick/c/pixel.d @@ -12,17 +12,20 @@ alias ptrdiff_t ssize_t; extern(C) { + /** + * The pixel color interpolation method. + */ enum InterpolatePixelMethod { - UndefinedInterpolatePixel, - AverageInterpolatePixel, - BicubicInterpolatePixel, - BilinearInterpolatePixel, - FilterInterpolatePixel, - IntegerInterpolatePixel, - MeshInterpolatePixel, - NearestNeighborInterpolatePixel, - SplineInterpolatePixel + UndefinedInterpolatePixel, /// + AverageInterpolatePixel, /// The average color of the surrounding four pixels. + BicubicInterpolatePixel, /// Fitted bicubic-spines of surrounding 16 pixels. + BilinearInterpolatePixel, /// A double linear interpolation of pixels (the default). + FilterInterpolatePixel, /// Use resize filter settings. + IntegerInterpolatePixel, /// The color of the top-left pixel (floor function). + MeshInterpolatePixel, /// Divide area into two flat triangular interpolations. + NearestNeighborInterpolatePixel, /// The nearest pixel to the lookup point (rounded function). + SplineInterpolatePixel /// Direct spline curves (colors are blurred). } diff --git a/dmagick/c/profile.d b/dmagick/c/profile.d index e499a31..645d844 100644 --- a/dmagick/c/profile.d +++ b/dmagick/c/profile.d @@ -21,12 +21,48 @@ extern(C) signature; } + /** + * Rendering intent is a concept defined by ICC Spec ICC.1:1998-09, + * "File Format for Color Profiles". ImageMagick uses RenderingIntent in + * order to support ICC Color Profiles. + * + * From the specification: "Rendering intent specifies the style of + * reproduction to be used during the evaluation of this profile in a + * sequence of profiles. It applies specifically to that profile in the + * sequence and not to the entire sequence. Typically, the user or + * application will set the rendering intent dynamically at runtime or + * embedding time." + */ enum RenderingIntent { + /** + * No intent has been specified. + */ UndefinedIntent, + + /** + * A rendering intent that specifies the saturation of the pixels in + * the image is preserved perhaps at the expense of accuracy in hue + * and lightness. + */ SaturationIntent, + + /** + * A rendering intent that specifies the full gamut of the image is + * compressed or expanded to fill the gamut of the destination + * device. Gray balance is preserved but colorimetric accuracy might + * not be preserved. + */ PerceptualIntent, + + /** + * Absolute colorimetric. + */ AbsoluteIntent, + + /** + * Relative colorimetric. + */ RelativeIntent } diff --git a/dmagick/c/quantum.d b/dmagick/c/quantum.d index 2a48c0a..c9c00ef 100644 --- a/dmagick/c/quantum.d +++ b/dmagick/c/quantum.d @@ -7,11 +7,14 @@ import dmagick.c.magickType; extern(C) { + /** + * The endianess of the image when reading the image file. + */ enum EndianType { - UndefinedEndian, - LSBEndian, - MSBEndian + UndefinedEndian, /// Not defined (default). + LSBEndian, /// Little Endian. + MSBEndian /// Big Endian. } enum QuantumAlphaType diff --git a/dmagick/c/resample.d b/dmagick/c/resample.d index 3a5323e..031ab96 100644 --- a/dmagick/c/resample.d +++ b/dmagick/c/resample.d @@ -22,36 +22,50 @@ extern(C) { version ( MagickCore_666_and_up ) { + /** + * Used to adjust the filter algorithm used when resizing images. + * Different filters experience varying degrees of success with + * various images and can take significantly different amounts of + * processing time. ImageMagick uses the LanczosFilter by default + * since this filter has been shown to provide the best results for + * most images in a reasonable amount of time. Other filter types + * (e.g. TriangleFilter) may execute much faster but may show + * artifacts when the image is re-sized or around diagonal lines. + * The only way to be sure is to test the filter with sample images. + * + * See_Also: $(LINK2 http://www.imagemagick.org/Usage/resize/, + * Resize Filters) in the Examples of ImageMagick Usage. + */ enum FilterTypes { - UndefinedFilter, - PointFilter, - BoxFilter, - TriangleFilter, - HermiteFilter, - HanningFilter, - HammingFilter, - BlackmanFilter, - GaussianFilter, - QuadraticFilter, - CubicFilter, - CatromFilter, - MitchellFilter, - JincFilter, - SincFilter, - SincFastFilter, - KaiserFilter, - WelshFilter, - ParzenFilter, - BohmanFilter, - BartlettFilter, - LagrangeFilter, - LanczosFilter, - LanczosSharpFilter, - Lanczos2Filter, - Lanczos2SharpFilter, - RobidouxFilter, - SentinelFilter, /* a count of all the filters, not a real filter */ + UndefinedFilter, /// + PointFilter, /// ditto + BoxFilter, /// ditto + TriangleFilter, /// ditto + HermiteFilter, /// ditto + HanningFilter, /// ditto + HammingFilter, /// ditto + BlackmanFilter, /// ditto + GaussianFilter, /// ditto + QuadraticFilter, /// ditto + CubicFilter, /// ditto + CatromFilter, /// ditto + MitchellFilter, /// ditto + JincFilter, /// ditto + SincFilter, /// ditto + SincFastFilter, /// ditto + KaiserFilter, /// ditto + WelshFilter, /// ditto + ParzenFilter, /// ditto + BohmanFilter, /// ditto + BartlettFilter, /// ditto + LagrangeFilter, /// ditto + LanczosFilter, /// ditto + LanczosSharpFilter, /// ditto + Lanczos2Filter, /// ditto + Lanczos2SharpFilter, /// ditto + RobidouxFilter, /// ditto + SentinelFilter, // a count of all the filters, not a real filter BesselFilter = JincFilter, Lanczos2DFilter = Lanczos2Filter, diff --git a/dmagick/c/statistic.d b/dmagick/c/statistic.d index 0bd7841..cf0703c 100644 --- a/dmagick/c/statistic.d +++ b/dmagick/c/statistic.d @@ -39,48 +39,57 @@ extern(C) } } + /** + * Alter channel pixels by evaluating an arithmetic, relational, + * or logical expression. + */ enum MagickEvaluateOperator { - UndefinedEvaluateOperator, - AddEvaluateOperator, - AndEvaluateOperator, - DivideEvaluateOperator, - LeftShiftEvaluateOperator, - MaxEvaluateOperator, - MinEvaluateOperator, - MultiplyEvaluateOperator, - OrEvaluateOperator, - RightShiftEvaluateOperator, - SetEvaluateOperator, - SubtractEvaluateOperator, - XorEvaluateOperator, - PowEvaluateOperator, - LogEvaluateOperator, - ThresholdEvaluateOperator, - ThresholdBlackEvaluateOperator, - ThresholdWhiteEvaluateOperator, - GaussianNoiseEvaluateOperator, - ImpulseNoiseEvaluateOperator, - LaplacianNoiseEvaluateOperator, - MultiplicativeNoiseEvaluateOperator, - PoissonNoiseEvaluateOperator, - UniformNoiseEvaluateOperator, - CosineEvaluateOperator, - SineEvaluateOperator, - AddModulusEvaluateOperator, - MeanEvaluateOperator, - AbsEvaluateOperator, - ExponentialEvaluateOperator, - MedianEvaluateOperator + UndefinedEvaluateOperator, /// + AddEvaluateOperator, /// Add value to pixels. + AndEvaluateOperator, /// Binary AND of pixels with value. + DivideEvaluateOperator, /// Divide pixels by value. + LeftShiftEvaluateOperator, /// Shift the pixel values left by value bits. + MaxEvaluateOperator, /// Clip pixels at lower bound value. + MinEvaluateOperator, /// Clip pixels at upper bound value. + MultiplyEvaluateOperator, /// Multiply pixels by value. + OrEvaluateOperator, /// Binary OR of pixels with value. + RightShiftEvaluateOperator, /// Shift the pixel values right by value bits. + SetEvaluateOperator, /// Set pixel equal to value. + SubtractEvaluateOperator, /// Subtract value from pixels. + XorEvaluateOperator, /// Binary XOR of pixels with value. + PowEvaluateOperator, /// Raise normalized pixels to the power value. + LogEvaluateOperator, /// Apply scaled logarithm to normalized pixels. + ThresholdEvaluateOperator, /// Threshold pixels larger than value. + ThresholdBlackEvaluateOperator, /// Threshold pixels to zero values equal to or below value. + ThresholdWhiteEvaluateOperator, /// Threshold pixels to maximum values above value. + GaussianNoiseEvaluateOperator, /// + ImpulseNoiseEvaluateOperator, /// ditto + LaplacianNoiseEvaluateOperator, /// ditto + MultiplicativeNoiseEvaluateOperator, /// ditto + PoissonNoiseEvaluateOperator, /// ditto + UniformNoiseEvaluateOperator, /// ditto + CosineEvaluateOperator, /// Apply cosine to pixels with frequency value with 50% bias added. + SineEvaluateOperator, /// Apply sine to pixels with frequency value with 50% bias added. + AddModulusEvaluateOperator, /// Add value to pixels modulo QuantumRange. + MeanEvaluateOperator, /// Add the value and divide by 2. + AbsEvaluateOperator, /// Add value to pixels and return absolute value. + ExponentialEvaluateOperator, /// base-e exponential function. + MedianEvaluateOperator /// Choose the median value from an image sequence. } + /** + * Apply a function to channel values. + * + * See_Also: $(XREF Image, functionImage). + */ enum MagickFunction { - UndefinedFunction, - PolynomialFunction, - SinusoidFunction, - ArcsinFunction, - ArctanFunction + UndefinedFunction, /// + PolynomialFunction, /// ditto + SinusoidFunction, /// ditto + ArcsinFunction, /// ditto + ArctanFunction /// ditto } ChannelStatistics* GetImageChannelStatistics(const(Image)*, ExceptionInfo*); |
