13ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// This may look like C code, but it is really -*- C++ -*-
23ed852eea50f9d4cd633efb8c2b054b8e33c253cristy//
33ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
465c048f88dc453cee63d88b871e1fc3e8a8d823edirk// Copyright Dirk Lemstra 2013-2016
53ed852eea50f9d4cd633efb8c2b054b8e33c253cristy//
63ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Definition of Image, the representation of a single image in Magick++
73ed852eea50f9d4cd633efb8c2b054b8e33c253cristy//
83ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
93ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#if !defined(Magick_Image_header)
103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#define Magick_Image_header
113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Include.h"
133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include <string>
143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include <list>
153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Blob.h"
163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Color.h"
173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Drawable.h"
183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Exception.h"
193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Geometry.h"
207b6b37ee0712fc684e19cf3b7472cf9063b3d2f5dirk#include "Magick++/Statistic.h"
213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/TypeMetric.h"
223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
233ed852eea50f9d4cd633efb8c2b054b8e33c253cristynamespace Magick
243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{
253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  // Forward declarations
263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  class Options;
273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  class ImageRef;
283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
29af1dd259230d63d51f441c28bc23265a79b19c55cristy  extern MagickPPExport const char *borderGeometryDefault;
30af1dd259230d63d51f441c28bc23265a79b19c55cristy  extern MagickPPExport const char *frameGeometryDefault;
31af1dd259230d63d51f441c28bc23265a79b19c55cristy  extern MagickPPExport const char *raiseGeometryDefault;
323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  // Compare two Image objects regardless of LHS/RHS
343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  // Image sizes and signatures are used as basis of comparison
351940fe06f035ea32a4ec4df61f6897396877aa3cdirk  MagickPPExport int operator ==
3695f389652b69ee5487f18e744b7f54dcda1c733cdirk    (const Magick::Image &left_,const Magick::Image &right_);
371940fe06f035ea32a4ec4df61f6897396877aa3cdirk  MagickPPExport int operator !=
3895f389652b69ee5487f18e744b7f54dcda1c733cdirk    (const Magick::Image &left_,const Magick::Image &right_);
391940fe06f035ea32a4ec4df61f6897396877aa3cdirk  MagickPPExport int operator >
4095f389652b69ee5487f18e744b7f54dcda1c733cdirk    (const Magick::Image &left_,const Magick::Image &right_);
411940fe06f035ea32a4ec4df61f6897396877aa3cdirk  MagickPPExport int operator <
4295f389652b69ee5487f18e744b7f54dcda1c733cdirk    (const Magick::Image &left_,const Magick::Image &right_);
431940fe06f035ea32a4ec4df61f6897396877aa3cdirk  MagickPPExport int operator >=
4495f389652b69ee5487f18e744b7f54dcda1c733cdirk    (const Magick::Image &left_,const Magick::Image &right_);
451940fe06f035ea32a4ec4df61f6897396877aa3cdirk  MagickPPExport int operator <=
4695f389652b69ee5487f18e744b7f54dcda1c733cdirk    (const Magick::Image &left_,const Magick::Image &right_);
473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  //
4995f389652b69ee5487f18e744b7f54dcda1c733cdirk  // Image is the representation of an image. In reality, it actually
503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  // a handle object which contains a pointer to a shared reference
513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  // object (ImageRef). As such, this object is extremely space efficient.
523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  //
53c4b500215778da0d84cc748f7193f0a30cfc7806dirk  class MagickPPExport Image
543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  {
553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  public:
5695f389652b69ee5487f18e744b7f54dcda1c733cdirk
5795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Default constructor
5895f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image(void);
593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Construct Image from in-memory BLOB
6195f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image(const Blob &blob_);
623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Construct Image of specified size from in-memory BLOB
6495f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image(const Blob &blob_,const Geometry &size_);
653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Construct Image of specified size and depth from in-memory BLOB
67fae20619a47497056073e51720a3517d387cc7dedirk    Image(const Blob &blob_,const Geometry &size_,const size_t depth_);
683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Construct Image of specified size, depth, and format from
703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // in-memory BLOB
71fae20619a47497056073e51720a3517d387cc7dedirk    Image(const Blob &blob_,const Geometry &size_,const size_t depth_,
7295f389652b69ee5487f18e744b7f54dcda1c733cdirk      const std::string &magick_);
7395f389652b69ee5487f18e744b7f54dcda1c733cdirk
7495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Construct Image of specified size, and format from in-memory BLOB
75fae20619a47497056073e51720a3517d387cc7dedirk    Image(const Blob &blob_,const Geometry &size_,const std::string &magick_);
7695f389652b69ee5487f18e744b7f54dcda1c733cdirk
7795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Construct a blank image canvas of specified size and color
7895f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image(const Geometry &size_,const Color &color_);
7995f389652b69ee5487f18e744b7f54dcda1c733cdirk
8095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Copy constructor
8195f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image(const Image &image_);
823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
83fae20619a47497056073e51720a3517d387cc7dedirk    // Copy constructor to copy part of the image
84fae20619a47497056073e51720a3517d387cc7dedirk    Image(const Image &image_,const Geometry &geometry_);
85fae20619a47497056073e51720a3517d387cc7dedirk
863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Construct an image based on an array of raw pixels, of
873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // specified type and mapping, in memory
8895f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image(const size_t width_,const size_t height_,const std::string &map_,
8995f389652b69ee5487f18e744b7f54dcda1c733cdirk      const StorageType type_,const void *pixels_);
903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
9195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Construct from image file or image specification
9295f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image(const std::string &imageSpec_);
93092a8ea1959d818804462ea79231863dc2e3fd26dirk
943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Destructor
9595f389652b69ee5487f18e744b7f54dcda1c733cdirk    virtual ~Image();
96092a8ea1959d818804462ea79231863dc2e3fd26dirk
973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Assignment operator
9895f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image& operator=(const Image &image_);
993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
10095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Join images into a single multi-image file
10195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void adjoin(const bool flag_);
10295f389652b69ee5487f18e744b7f54dcda1c733cdirk    bool adjoin(void) const;
10395f389652b69ee5487f18e744b7f54dcda1c733cdirk
1041940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Image supports transparency (alpha channel)
1051940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void alpha(const bool alphaFlag_);
1061940fe06f035ea32a4ec4df61f6897396877aa3cdirk    bool alpha(void) const;
1071940fe06f035ea32a4ec4df61f6897396877aa3cdirk
1081940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Transparent color
1091940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void alphaColor(const Color &alphaColor_);
1101940fe06f035ea32a4ec4df61f6897396877aa3cdirk    Color alphaColor(void) const;
1111940fe06f035ea32a4ec4df61f6897396877aa3cdirk
11295f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Time in 1/100ths of a second which must expire before
11395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // displaying the next image in an animated sequence.
11495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void animationDelay(const size_t delay_);
11595f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t animationDelay(void) const;
11695f389652b69ee5487f18e744b7f54dcda1c733cdirk
117019efc8c2270c29096a4c8975cde80a84da06ba0dirk    // Lessen (or intensify) when adding noise to an image.
118019efc8c2270c29096a4c8975cde80a84da06ba0dirk    void attenuate(const double attenuate_);
119019efc8c2270c29096a4c8975cde80a84da06ba0dirk
12095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Number of iterations to loop an animation (e.g. Netscape loop
12195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // extension) for.
12295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void animationIterations(const size_t iterations_);
12395f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t animationIterations(void) const;
12495f389652b69ee5487f18e744b7f54dcda1c733cdirk
12595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image background color
12695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void backgroundColor(const Color &color_);
12795f389652b69ee5487f18e744b7f54dcda1c733cdirk    Color backgroundColor(void) const;
12895f389652b69ee5487f18e744b7f54dcda1c733cdirk
12995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Name of texture image to tile onto the image background
13095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void backgroundTexture(const std::string &backgroundTexture_);
13195f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string backgroundTexture(void) const;
13295f389652b69ee5487f18e744b7f54dcda1c733cdirk
13395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Base image width (before transformations)
13495f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t baseColumns(void) const;
13595f389652b69ee5487f18e744b7f54dcda1c733cdirk
13695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Base image filename (before transformations)
13795f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string baseFilename(void) const;
13895f389652b69ee5487f18e744b7f54dcda1c733cdirk
13995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Base image height (before transformations)
14095f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t baseRows(void) const;
14195f389652b69ee5487f18e744b7f54dcda1c733cdirk
14249dfa4460aa3429cf739805478df9872ca5e2136dirk    // Use black point compensation.
14349dfa4460aa3429cf739805478df9872ca5e2136dirk    void blackPointCompensation(const bool flag_);
14449dfa4460aa3429cf739805478df9872ca5e2136dirk    bool blackPointCompensation(void) const;
14549dfa4460aa3429cf739805478df9872ca5e2136dirk
14695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image border color
14795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void borderColor(const Color &color_);
14895f389652b69ee5487f18e744b7f54dcda1c733cdirk    Color borderColor(void) const;
14995f389652b69ee5487f18e744b7f54dcda1c733cdirk
15095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Return smallest bounding box enclosing non-border pixels. The
15195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // current fuzz value is used when discriminating between pixels.
15295f389652b69ee5487f18e744b7f54dcda1c733cdirk    // This is the crop bounding box used by crop(Geometry(0,0));
15395f389652b69ee5487f18e744b7f54dcda1c733cdirk    Geometry boundingBox(void) const;
15495f389652b69ee5487f18e744b7f54dcda1c733cdirk
15595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Text bounding-box base color (default none)
15695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void boxColor(const Color &boxColor_);
15795f389652b69ee5487f18e744b7f54dcda1c733cdirk    Color boxColor(void) const;
15895f389652b69ee5487f18e744b7f54dcda1c733cdirk
15995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Set or obtain modulus channel depth
160f781e34db4b820ba9eacdc8aa04def9bf0cb599fdirk    void channelDepth(const ChannelType channel_,const size_t depth_);
161f781e34db4b820ba9eacdc8aa04def9bf0cb599fdirk    size_t channelDepth(const ChannelType channel_);
16295f389652b69ee5487f18e744b7f54dcda1c733cdirk
16395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Returns the number of channels in this image.
16495f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t channels() const;
16595f389652b69ee5487f18e744b7f54dcda1c733cdirk
16695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image class (DirectClass or PseudoClass)
16795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // NOTE: setting a DirectClass image to PseudoClass will result in
16895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // the loss of color information if the number of colors in the
16995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // image is greater than the maximum palette size (either 256 or
17095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // 65536 entries depending on the value of MAGICKCORE_QUANTUM_DEPTH when
17195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // ImageMagick was built).
17295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void classType(const ClassType class_);
17395f389652b69ee5487f18e744b7f54dcda1c733cdirk    ClassType classType(void) const;
17495f389652b69ee5487f18e744b7f54dcda1c733cdirk
17595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Colors within this distance are considered equal
17695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void colorFuzz(const double fuzz_);
17795f389652b69ee5487f18e744b7f54dcda1c733cdirk    double colorFuzz(void) const;
17895f389652b69ee5487f18e744b7f54dcda1c733cdirk
17995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Colormap size (number of colormap entries)
18095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void colorMapSize(const size_t entries_);
18195f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t colorMapSize(void) const;
18295f389652b69ee5487f18e744b7f54dcda1c733cdirk
18395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image Color Space
18495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void colorSpace(const ColorspaceType colorSpace_);
18595f389652b69ee5487f18e744b7f54dcda1c733cdirk    ColorspaceType colorSpace(void) const;
18695f389652b69ee5487f18e744b7f54dcda1c733cdirk
1871940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void colorSpaceType(const ColorspaceType colorSpace_);
1881940fe06f035ea32a4ec4df61f6897396877aa3cdirk    ColorspaceType colorSpaceType(void) const;
18995f389652b69ee5487f18e744b7f54dcda1c733cdirk
19095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image width
19195f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t columns(void) const;
19295f389652b69ee5487f18e744b7f54dcda1c733cdirk
19395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Comment image (add comment string to image)
19495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void comment(const std::string &comment_);
19595f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string comment(void) const;
19695f389652b69ee5487f18e744b7f54dcda1c733cdirk
19795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Composition operator to be used when composition is implicitly
19895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // used (such as for image flattening).
19995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void compose(const CompositeOperator compose_);
20095f389652b69ee5487f18e744b7f54dcda1c733cdirk    CompositeOperator compose(void) const;
20195f389652b69ee5487f18e744b7f54dcda1c733cdirk
20295f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Compression type
20395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void compressType(const CompressionType compressType_);
20495f389652b69ee5487f18e744b7f54dcda1c733cdirk    CompressionType compressType(void) const;
20595f389652b69ee5487f18e744b7f54dcda1c733cdirk
20695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Enable printing of debug messages from ImageMagick
20795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void debug(const bool flag_);
20895f389652b69ee5487f18e744b7f54dcda1c733cdirk    bool debug(void) const;
20995f389652b69ee5487f18e744b7f54dcda1c733cdirk
21095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Vertical and horizontal resolution in pixels of the image
211be1bbacaa9919aa3754e3abae43557be13669657dirk    void density(const Point &density_);
212be1bbacaa9919aa3754e3abae43557be13669657dirk    Point density(void) const;
21395f389652b69ee5487f18e744b7f54dcda1c733cdirk
21495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image depth (bits allocated to red/green/blue components)
21595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void depth(const size_t depth_);
21695f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t depth(void) const;
21795f389652b69ee5487f18e744b7f54dcda1c733cdirk
21895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Tile names from within an image montage
21995f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string directory(void) const;
22095f389652b69ee5487f18e744b7f54dcda1c733cdirk
22195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Endianness (little like Intel or big like SPARC) for image
22295f389652b69ee5487f18e744b7f54dcda1c733cdirk    // formats which support endian-specific options.
22395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void endian(const EndianType endian_);
22495f389652b69ee5487f18e744b7f54dcda1c733cdirk    EndianType endian(void) const;
22595f389652b69ee5487f18e744b7f54dcda1c733cdirk
22695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Exif profile (BLOB)
22795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void exifProfile(const Blob &exifProfile_);
22895f389652b69ee5487f18e744b7f54dcda1c733cdirk    Blob exifProfile(void) const;
22995f389652b69ee5487f18e744b7f54dcda1c733cdirk
23095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image file name
23195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void fileName(const std::string &fileName_);
23295f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string fileName(void) const;
23395f389652b69ee5487f18e744b7f54dcda1c733cdirk
23495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Number of bytes of the image on disk
2351940fe06f035ea32a4ec4df61f6897396877aa3cdirk    MagickSizeType fileSize(void) const;
23695f389652b69ee5487f18e744b7f54dcda1c733cdirk
23795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Color to use when filling drawn objects
23895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void fillColor(const Color &fillColor_);
23995f389652b69ee5487f18e744b7f54dcda1c733cdirk    Color fillColor(void) const;
24095f389652b69ee5487f18e744b7f54dcda1c733cdirk
24195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Rule to use when filling drawn objects
24295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void fillRule(const FillRule &fillRule_);
24395f389652b69ee5487f18e744b7f54dcda1c733cdirk    FillRule fillRule(void) const;
24495f389652b69ee5487f18e744b7f54dcda1c733cdirk
24595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Pattern to use while filling drawn objects.
24695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void fillPattern(const Image &fillPattern_);
24795f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image fillPattern(void) const;
24895f389652b69ee5487f18e744b7f54dcda1c733cdirk
24995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Filter to use when resizing image
2508b9f21cab4c50eb7d6e558a7a43a68833fe0b55ddirk    void filterType(const FilterType filterType_);
2518b9f21cab4c50eb7d6e558a7a43a68833fe0b55ddirk    FilterType filterType(void) const;
25295f389652b69ee5487f18e744b7f54dcda1c733cdirk
25395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Text rendering font
25495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void font(const std::string &font_);
25595f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string font(void) const;
25695f389652b69ee5487f18e744b7f54dcda1c733cdirk
2576409f34d637a34a1c643632aa849371ec8b3b5a8dirk    // Font family
2586409f34d637a34a1c643632aa849371ec8b3b5a8dirk    void fontFamily(const std::string &family_);
2596409f34d637a34a1c643632aa849371ec8b3b5a8dirk    std::string fontFamily(void) const;
2606409f34d637a34a1c643632aa849371ec8b3b5a8dirk
26195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Font point size
26295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void fontPointsize(const double pointSize_);
26395f389652b69ee5487f18e744b7f54dcda1c733cdirk    double fontPointsize(void) const;
26495f389652b69ee5487f18e744b7f54dcda1c733cdirk
26561ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk    // Font style
26661ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk    void fontStyle(const StyleType style_);
26761ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk    StyleType fontStyle(void) const;
26861ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk
26961ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk    // Font weight
27061ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk    void fontWeight(const size_t weight_);
27161ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk    size_t fontWeight(void) const;
27261ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk
27395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Long image format description
27495f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string format(void) const;
27595f389652b69ee5487f18e744b7f54dcda1c733cdirk
276aefa9c18d4d9bdd46e7bf1e09ce1b3185312820edirk    // Formats the specified expression
277aefa9c18d4d9bdd46e7bf1e09ce1b3185312820edirk    // More info here: http://www.imagemagick.org/script/escape.php
278aefa9c18d4d9bdd46e7bf1e09ce1b3185312820edirk    std::string formatExpression(const std::string expression);
279aefa9c18d4d9bdd46e7bf1e09ce1b3185312820edirk
28095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Gamma level of the image
28195f389652b69ee5487f18e744b7f54dcda1c733cdirk    double gamma(void) const;
28295f389652b69ee5487f18e744b7f54dcda1c733cdirk
28395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Preferred size of the image when encoding
28495f389652b69ee5487f18e744b7f54dcda1c733cdirk    Geometry geometry(void) const;
28595f389652b69ee5487f18e744b7f54dcda1c733cdirk
28695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // GIF disposal method
2871940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void gifDisposeMethod(const DisposeType disposeMethod_);
2881940fe06f035ea32a4ec4df61f6897396877aa3cdirk    DisposeType gifDisposeMethod(void) const;
28995f389652b69ee5487f18e744b7f54dcda1c733cdirk
290d873c4a941602fe7aad3a06900166a4da3eb56b8dirk    bool hasChannel(const PixelChannel channel) const;
291d873c4a941602fe7aad3a06900166a4da3eb56b8dirk
292019efc8c2270c29096a4c8975cde80a84da06ba0dirk    // When comparing images, emphasize pixel differences with this color.
293019efc8c2270c29096a4c8975cde80a84da06ba0dirk    void highlightColor(const Color color_);
294019efc8c2270c29096a4c8975cde80a84da06ba0dirk
29595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // ICC color profile (BLOB)
29695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void iccColorProfile(const Blob &colorProfile_);
29795f389652b69ee5487f18e744b7f54dcda1c733cdirk    Blob iccColorProfile(void) const;
29895f389652b69ee5487f18e744b7f54dcda1c733cdirk
29995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Type of interlacing to use
30095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void interlaceType(const InterlaceType interlace_);
30195f389652b69ee5487f18e744b7f54dcda1c733cdirk    InterlaceType interlaceType(void) const;
30295f389652b69ee5487f18e744b7f54dcda1c733cdirk
303f8c6db577bf34604c1b62d0ac8ae0a3010750493dirk    // Pixel color interpolation method to use
304f8c6db577bf34604c1b62d0ac8ae0a3010750493dirk    void interpolate(const PixelInterpolateMethod interpolate_);
305f8c6db577bf34604c1b62d0ac8ae0a3010750493dirk    PixelInterpolateMethod interpolate(void) const;
306f8c6db577bf34604c1b62d0ac8ae0a3010750493dirk
30795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // IPTC profile (BLOB)
30895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void iptcProfile(const Blob &iptcProfile_);
30995f389652b69ee5487f18e744b7f54dcda1c733cdirk    Blob iptcProfile(void) const;
31095f389652b69ee5487f18e744b7f54dcda1c733cdirk
311fbb0a3f139d16789fc2bcaaa4a547ff9d931ee1cdirk    // Returns true if none of the pixels in the image have an alpha value
312fbb0a3f139d16789fc2bcaaa4a547ff9d931ee1cdirk    // other than OpaqueAlpha (QuantumRange).
313fbb0a3f139d16789fc2bcaaa4a547ff9d931ee1cdirk    bool isOpaque(void) const;
314fbb0a3f139d16789fc2bcaaa4a547ff9d931ee1cdirk
31595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Does object contain valid image?
31695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void isValid(const bool isValid_);
31795f389652b69ee5487f18e744b7f54dcda1c733cdirk    bool isValid(void) const;
31895f389652b69ee5487f18e744b7f54dcda1c733cdirk
31995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image label
3201940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void label(const std::string &label_);
32195f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string label(void) const;
32295f389652b69ee5487f18e744b7f54dcda1c733cdirk
323019efc8c2270c29096a4c8975cde80a84da06ba0dirk    // When comparing images, de-emphasize pixel differences with this color.
324019efc8c2270c29096a4c8975cde80a84da06ba0dirk    void lowlightColor(const Color color_);
325019efc8c2270c29096a4c8975cde80a84da06ba0dirk
32695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // File type magick identifier (.e.g "GIF")
32795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void magick(const std::string &magick_);
32895f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string magick(void) const;
32995f389652b69ee5487f18e744b7f54dcda1c733cdirk
33095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // The mean error per pixel computed when an image is color reduced
33195f389652b69ee5487f18e744b7f54dcda1c733cdirk    double meanErrorPerPixel(void) const;
33295f389652b69ee5487f18e744b7f54dcda1c733cdirk
33395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image modulus depth (minimum number of bits required to support
33495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // red/green/blue components without loss of accuracy)
33595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void modulusDepth(const size_t modulusDepth_);
33695f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t modulusDepth(void) const;
33795f389652b69ee5487f18e744b7f54dcda1c733cdirk
33895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Transform image to black and white
33995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void monochrome(const bool monochromeFlag_);
34095f389652b69ee5487f18e744b7f54dcda1c733cdirk    bool monochrome(void) const;
34195f389652b69ee5487f18e744b7f54dcda1c733cdirk
3421940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Tile size and offset within an image montage
3431940fe06f035ea32a4ec4df61f6897396877aa3cdirk    Geometry montageGeometry(void) const;
3441940fe06f035ea32a4ec4df61f6897396877aa3cdirk
34595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // The normalized max error per pixel computed when an image is
34695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // color reduced.
34795f389652b69ee5487f18e744b7f54dcda1c733cdirk    double normalizedMaxError(void) const;
34895f389652b69ee5487f18e744b7f54dcda1c733cdirk
34995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // The normalized mean error per pixel computed when an image is
35095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // color reduced.
35195f389652b69ee5487f18e744b7f54dcda1c733cdirk    double normalizedMeanError(void) const;
35295f389652b69ee5487f18e744b7f54dcda1c733cdirk
35395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image orientation
35495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void orientation(const OrientationType orientation_);
35595f389652b69ee5487f18e744b7f54dcda1c733cdirk    OrientationType orientation(void) const;
35695f389652b69ee5487f18e744b7f54dcda1c733cdirk
35795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Preferred size and location of an image canvas.
35895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void page(const Geometry &pageSize_);
35995f389652b69ee5487f18e744b7f54dcda1c733cdirk    Geometry page(void) const;
36095f389652b69ee5487f18e744b7f54dcda1c733cdirk
36195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // JPEG/MIFF/PNG compression level (default 75).
36295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void quality(const size_t quality_);
36395f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t quality(void) const;
36495f389652b69ee5487f18e744b7f54dcda1c733cdirk
36595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Maximum number of colors to quantize to
36695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void quantizeColors(const size_t colors_);
36795f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t quantizeColors(void) const;
36895f389652b69ee5487f18e744b7f54dcda1c733cdirk
36995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Colorspace to quantize in.
37095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void quantizeColorSpace(const ColorspaceType colorSpace_);
37195f389652b69ee5487f18e744b7f54dcda1c733cdirk    ColorspaceType quantizeColorSpace(void) const;
37295f389652b69ee5487f18e744b7f54dcda1c733cdirk
37395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Dither image during quantization (default true).
37495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void quantizeDither(const bool ditherFlag_);
37595f389652b69ee5487f18e744b7f54dcda1c733cdirk    bool quantizeDither(void) const;
37695f389652b69ee5487f18e744b7f54dcda1c733cdirk
3776d64b3658c2fa7218fbc309b9c85e3ec4441310edirk    // Dither method
3786d64b3658c2fa7218fbc309b9c85e3ec4441310edirk    void quantizeDitherMethod(const DitherMethod ditherMethod_);
3796d64b3658c2fa7218fbc309b9c85e3ec4441310edirk    DitherMethod quantizeDitherMethod(void) const;
3806d64b3658c2fa7218fbc309b9c85e3ec4441310edirk
38195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Quantization tree-depth
38295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void quantizeTreeDepth(const size_t treeDepth_);
38395f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t quantizeTreeDepth(void) const;
38495f389652b69ee5487f18e744b7f54dcda1c733cdirk
38577328896b876314656427663695bc7b2c9be3f74dirk    // Suppress all warning messages. Error messages are still reported.
38677328896b876314656427663695bc7b2c9be3f74dirk    void quiet(const bool quiet_);
38777328896b876314656427663695bc7b2c9be3f74dirk    bool quiet(void) const;
38877328896b876314656427663695bc7b2c9be3f74dirk
38995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // The type of rendering intent
39095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void renderingIntent(const RenderingIntent renderingIntent_);
39195f389652b69ee5487f18e744b7f54dcda1c733cdirk    RenderingIntent renderingIntent(void) const;
39295f389652b69ee5487f18e744b7f54dcda1c733cdirk
39395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Units of image resolution
39495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void resolutionUnits(const ResolutionType resolutionUnits_);
39595f389652b69ee5487f18e744b7f54dcda1c733cdirk    ResolutionType resolutionUnits(void) const;
39695f389652b69ee5487f18e744b7f54dcda1c733cdirk
39795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // The number of pixel rows in the image
39895f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t rows(void) const;
39995f389652b69ee5487f18e744b7f54dcda1c733cdirk
40095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image scene number
40195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void scene(const size_t scene_);
40295f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t scene(void) const;
40395f389652b69ee5487f18e744b7f54dcda1c733cdirk
40495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Width and height of a raw image
40595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void size(const Geometry &geometry_);
40695f389652b69ee5487f18e744b7f54dcda1c733cdirk    Geometry size(void) const;
40795f389652b69ee5487f18e744b7f54dcda1c733cdirk
40895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // enabled/disable stroke anti-aliasing
40995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void strokeAntiAlias(const bool flag_);
41095f389652b69ee5487f18e744b7f54dcda1c733cdirk    bool strokeAntiAlias(void) const;
41195f389652b69ee5487f18e744b7f54dcda1c733cdirk
41295f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Color to use when drawing object outlines
41395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void strokeColor(const Color &strokeColor_);
41495f389652b69ee5487f18e744b7f54dcda1c733cdirk    Color strokeColor(void) const;
41595f389652b69ee5487f18e744b7f54dcda1c733cdirk
41695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Specify the pattern of dashes and gaps used to stroke
41795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // paths. The strokeDashArray represents a zero-terminated array
41895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // of numbers that specify the lengths of alternating dashes and
41995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // gaps in pixels. If an odd number of values is provided, then
42095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // the list of values is repeated to yield an even number of
42195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // values.  A typical strokeDashArray_ array might contain the
42295f389652b69ee5487f18e744b7f54dcda1c733cdirk    // members 5 3 2 0, where the zero value indicates the end of the
42395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // pattern array.
42495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void strokeDashArray(const double *strokeDashArray_);
42595f389652b69ee5487f18e744b7f54dcda1c733cdirk    const double *strokeDashArray(void) const;
42695f389652b69ee5487f18e744b7f54dcda1c733cdirk
42795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // While drawing using a dash pattern, specify distance into the
42895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // dash pattern to start the dash (default 0).
42995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void strokeDashOffset(const double strokeDashOffset_);
43095f389652b69ee5487f18e744b7f54dcda1c733cdirk    double strokeDashOffset(void) const;
43195f389652b69ee5487f18e744b7f54dcda1c733cdirk
43295f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Specify the shape to be used at the end of open subpaths when
43395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // they are stroked. Values of LineCap are UndefinedCap, ButtCap,
43495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // RoundCap, and SquareCap.
43595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void strokeLineCap(const LineCap lineCap_);
43695f389652b69ee5487f18e744b7f54dcda1c733cdirk    LineCap strokeLineCap(void) const;
43795f389652b69ee5487f18e744b7f54dcda1c733cdirk
43895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Specify the shape to be used at the corners of paths (or other
43995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // vector shapes) when they are stroked. Values of LineJoin are
44095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.
44195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void strokeLineJoin(const LineJoin lineJoin_);
44295f389652b69ee5487f18e744b7f54dcda1c733cdirk    LineJoin strokeLineJoin(void) const;
44395f389652b69ee5487f18e744b7f54dcda1c733cdirk
44495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Specify miter limit. When two line segments meet at a sharp
44595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // angle and miter joins have been specified for 'lineJoin', it is
44695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // possible for the miter to extend far beyond the thickness of
44795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // the line stroking the path. The miterLimit' imposes a limit on
44895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // the ratio of the miter length to the 'lineWidth'. The default
44995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // value of this parameter is 4.
45095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void strokeMiterLimit(const size_t miterLimit_);
45195f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t strokeMiterLimit(void) const;
45295f389652b69ee5487f18e744b7f54dcda1c733cdirk
45395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Pattern image to use while stroking object outlines.
45495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void strokePattern(const Image &strokePattern_);
45595f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image strokePattern(void) const;
45695f389652b69ee5487f18e744b7f54dcda1c733cdirk
45795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Stroke width for drawing vector objects (default one)
45895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void strokeWidth(const double strokeWidth_);
45995f389652b69ee5487f18e744b7f54dcda1c733cdirk    double strokeWidth(void) const;
46095f389652b69ee5487f18e744b7f54dcda1c733cdirk
46195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Subimage of an image sequence
46295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void subImage(const size_t subImage_);
46395f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t subImage(void) const;
46495f389652b69ee5487f18e744b7f54dcda1c733cdirk
46595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Number of images relative to the base image
46695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void subRange(const size_t subRange_);
46795f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t subRange(void) const;
46895f389652b69ee5487f18e744b7f54dcda1c733cdirk
469ea20b31c9b8d1a55b400559ae15760243dcb897fdirk    // Anti-alias Postscript and TrueType fonts (default true)
470ea20b31c9b8d1a55b400559ae15760243dcb897fdirk    void textAntiAlias(const bool flag_);
471ea20b31c9b8d1a55b400559ae15760243dcb897fdirk    bool textAntiAlias(void) const;
472ea20b31c9b8d1a55b400559ae15760243dcb897fdirk
473d37417692d7a7040aa854e493723e92fac1e3ae6dirk    // Render text right-to-left or left-to-right.
474d37417692d7a7040aa854e493723e92fac1e3ae6dirk    void textDirection(DirectionType direction_);
475d37417692d7a7040aa854e493723e92fac1e3ae6dirk    DirectionType textDirection() const;
476d37417692d7a7040aa854e493723e92fac1e3ae6dirk
47795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Annotation text encoding (e.g. "UTF-16")
47895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void textEncoding(const std::string &encoding_);
47995f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string textEncoding(void) const;
48095f389652b69ee5487f18e744b7f54dcda1c733cdirk
481d37417692d7a7040aa854e493723e92fac1e3ae6dirk    // Text gravity.
482d37417692d7a7040aa854e493723e92fac1e3ae6dirk    void textGravity(GravityType gravity_);
483d37417692d7a7040aa854e493723e92fac1e3ae6dirk    GravityType textGravity() const;
484d37417692d7a7040aa854e493723e92fac1e3ae6dirk
485a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk    // Text inter-line spacing
486a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk    void textInterlineSpacing(double spacing_);
487a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk    double textInterlineSpacing(void) const;
488a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk
489a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk    // Text inter-word spacing
490a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk    void textInterwordSpacing(double spacing_);
491a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk    double textInterwordSpacing(void) const;
492a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk
493a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk    // Text inter-character kerning
494a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk    void textKerning(double kerning_);
495a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk    double textKerning(void) const;
496a424799a0e5bfd6d1b7941c044e067fbf18d319fdirk
49761ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk    // Text undercolor box
49861ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk    void textUnderColor(const Color &underColor_);
49961ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk    Color textUnderColor(void) const;
50061ab4ad4628896f4b8a4dbc6a369a93c8696efcadirk
50195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Number of colors in the image
50295f389652b69ee5487f18e744b7f54dcda1c733cdirk    size_t totalColors(void) const;
50395f389652b69ee5487f18e744b7f54dcda1c733cdirk
50495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Rotation to use when annotating with text or drawing
50595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void transformRotation(const double angle_);
50695f389652b69ee5487f18e744b7f54dcda1c733cdirk
50795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Skew to use in X axis when annotating with text or drawing
50895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void transformSkewX(const double skewx_);
50995f389652b69ee5487f18e744b7f54dcda1c733cdirk
51095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Skew to use in Y axis when annotating with text or drawing
51195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void transformSkewY(const double skewy_);
51295f389652b69ee5487f18e744b7f54dcda1c733cdirk
51395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image representation type (also see type operation)
51495f389652b69ee5487f18e744b7f54dcda1c733cdirk    //   Available types:
51595f389652b69ee5487f18e744b7f54dcda1c733cdirk    //    Bilevel        Grayscale       GrayscaleMatte
51695f389652b69ee5487f18e744b7f54dcda1c733cdirk    //    Palette        PaletteMatte    TrueColor
51795f389652b69ee5487f18e744b7f54dcda1c733cdirk    //    TrueColorMatte ColorSeparation ColorSeparationMatte
51895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void type(const ImageType type_);
51995f389652b69ee5487f18e744b7f54dcda1c733cdirk    ImageType type(void) const;
52095f389652b69ee5487f18e744b7f54dcda1c733cdirk
52195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Print detailed information about the image
52295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void verbose(const bool verboseFlag_);
52395f389652b69ee5487f18e744b7f54dcda1c733cdirk    bool verbose(void) const;
52495f389652b69ee5487f18e744b7f54dcda1c733cdirk
52595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Virtual pixel method
52695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void virtualPixelMethod(const VirtualPixelMethod virtualPixelMethod_);
52795f389652b69ee5487f18e744b7f54dcda1c733cdirk    VirtualPixelMethod virtualPixelMethod(void) const;
52895f389652b69ee5487f18e744b7f54dcda1c733cdirk
52995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // X11 display to display to, obtain fonts from, or to capture
53095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // image from
53195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void x11Display(const std::string &display_);
53295f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string x11Display(void) const;
53395f389652b69ee5487f18e744b7f54dcda1c733cdirk
53495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // x resolution of the image
53595f389652b69ee5487f18e744b7f54dcda1c733cdirk    double xResolution(void) const;
53695f389652b69ee5487f18e744b7f54dcda1c733cdirk
53795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // y resolution of the image
53895f389652b69ee5487f18e744b7f54dcda1c733cdirk    double yResolution(void) const;
5393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
5403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Adaptive-blur image with specified blur factor
5413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // The radius_ parameter specifies the radius of the Gaussian, in
5423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // pixels, not counting the center pixel.  The sigma_ parameter
5433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // specifies the standard deviation of the Laplacian, in pixels.
54495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void adaptiveBlur(const double radius_=0.0,const double sigma_=1.0);
5457323460d5cd42b6e10481f8fdbbdab7237cffab7dirk
5467323460d5cd42b6e10481f8fdbbdab7237cffab7dirk    // This is shortcut function for a fast interpolative resize using mesh
5477323460d5cd42b6e10481f8fdbbdab7237cffab7dirk    // interpolation.  It works well for small resizes of less than +/- 50%
5487323460d5cd42b6e10481f8fdbbdab7237cffab7dirk    // of the original image size.  For larger resizing on images a full
5497323460d5cd42b6e10481f8fdbbdab7237cffab7dirk    // filtered and slower resize function should be used instead.
55095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void adaptiveResize(const Geometry &geometry_);
5517323460d5cd42b6e10481f8fdbbdab7237cffab7dirk
5527323460d5cd42b6e10481f8fdbbdab7237cffab7dirk    // Adaptively sharpens the image by sharpening more intensely near image
5537323460d5cd42b6e10481f8fdbbdab7237cffab7dirk    // edges and less intensely far from edges. We sharpen the image with a
5547323460d5cd42b6e10481f8fdbbdab7237cffab7dirk    // Gaussian operator of the given radius and standard deviation (sigma).
5557323460d5cd42b6e10481f8fdbbdab7237cffab7dirk    // For reasonable results, radius should be larger than sigma.
55695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void adaptiveSharpen(const double radius_=0.0,const double sigma_=1.0);
55795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void adaptiveSharpenChannel(const ChannelType channel_,
55895f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double radius_=0.0,const double sigma_=1.0);
5597323460d5cd42b6e10481f8fdbbdab7237cffab7dirk
5603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Local adaptive threshold image
5613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm
5623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Width x height define the size of the pixel neighborhood
563b1461b0e2f9ba7fab579489eb3760eb6ef8f2386dirk    // bias = constant to subtract from pixel neighborhood mean
564b1461b0e2f9ba7fab579489eb3760eb6ef8f2386dirk    void adaptiveThreshold(const size_t width_,const size_t height_,
565b1461b0e2f9ba7fab579489eb3760eb6ef8f2386dirk      const double bias_=0.0);
5663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
5673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Add noise to image with specified noise type
56895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void addNoise(const NoiseType noiseType_);
56995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void addNoiseChannel(const ChannelType channel_,
57095f389652b69ee5487f18e744b7f54dcda1c733cdirk      const NoiseType noiseType_);
5713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
5723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Transform image by specified affine (or free transform) matrix.
57395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void affineTransform(const DrawableAffine &affine);
5743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
5751bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // Set or attenuate the alpha channel in the image. If the image
5761bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // pixels are opaque then they are set to the specified alpha
5771bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // value, otherwise they are blended with the supplied alpha
5781bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // value.  The value of alpha_ ranges from 0 (completely opaque)
5791bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // to QuantumRange. The defines OpaqueAlpha and TransparentAlpha are
5801bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // available to specify completely opaque or completely
5811bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // transparent, respectively.
58295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void alpha(const unsigned int alpha_);
5831bab013cd87579204c8eb4671e3e658ef49d9aaadirk
584d246d8eb9563661d9cfe52a2dd87414bd2e10a5fdirk    // AlphaChannel() activates, deactivates, resets, or sets the alpha
585d246d8eb9563661d9cfe52a2dd87414bd2e10a5fdirk    // channel.
58695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void alphaChannel(AlphaChannelOption alphaOption_);
58795f389652b69ee5487f18e744b7f54dcda1c733cdirk
5883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //
5893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Annotate image (draw text on image)
5903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //
5913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Gravity effects text placement in bounding area according to rules:
5923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  NorthWestGravity  text bottom-left corner placed at top-left
5933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  NorthGravity      text bottom-center placed at top-center
5943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  NorthEastGravity  text bottom-right corner placed at top-right
5953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  WestGravity       text left-center placed at left-center
5963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  CenterGravity     text center placed at center
5973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  EastGravity       text right-center placed at right-center
5983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  SouthWestGravity  text top-left placed at bottom-left
5993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  SouthGravity      text top-center placed at bottom-center
6003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  SouthEastGravity  text top-right placed at bottom-right
6013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
6023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Annotate using specified text, and placement location
60395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void annotate(const std::string &text_,const Geometry &location_);
60495f389652b69ee5487f18e744b7f54dcda1c733cdirk
6053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Annotate using specified text, bounding area, and placement
6063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // gravity
60795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void annotate(const std::string &text_,const Geometry &boundingArea_,
60895f389652b69ee5487f18e744b7f54dcda1c733cdirk      const GravityType gravity_);
60995f389652b69ee5487f18e744b7f54dcda1c733cdirk
6103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Annotate with text using specified text, bounding area,
6113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // placement gravity, and rotation.
61295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void annotate(const std::string &text_,const Geometry &boundingArea_,
61395f389652b69ee5487f18e744b7f54dcda1c733cdirk      const GravityType gravity_,const double degrees_);
61495f389652b69ee5487f18e744b7f54dcda1c733cdirk
6153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Annotate with text (bounding area is entire image) and placement
6163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // gravity.
61795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void annotate(const std::string &text_,const GravityType gravity_);
618b5e877bd8701bc3f0ac1e9a3679a6cee64c69674cristy
619b5e877bd8701bc3f0ac1e9a3679a6cee64c69674cristy    // Inserts the artifact with the specified name and value into
620b5e877bd8701bc3f0ac1e9a3679a6cee64c69674cristy    // the artifact tree of the image.
62195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void artifact(const std::string &name_,const std::string &value_);
62295f389652b69ee5487f18e744b7f54dcda1c733cdirk
623b5e877bd8701bc3f0ac1e9a3679a6cee64c69674cristy    // Returns the value of the artifact with the specified name.
624100c62ceee252ed475fca6a57b3dbaa3d27d2ed9dirk    std::string artifact(const std::string &name_) const;
62595f389652b69ee5487f18e744b7f54dcda1c733cdirk
62695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Access/Update a named image attribute
62795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void attribute(const std::string name_,const std::string value_);
628100c62ceee252ed475fca6a57b3dbaa3d27d2ed9dirk    std::string attribute(const std::string name_) const;
629ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk
630ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk    // Extracts the 'mean' from the image and adjust the image to try
631ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk    // make set its gamma appropriatally.
63295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void autoGamma(void);
63395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void autoGammaChannel(const ChannelType channel_);
634ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk
635ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk    // Adjusts the levels of a particular image channel by scaling the
636ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk    // minimum and maximum values to the full quantum range.
63795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void autoLevel(void);
63895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void autoLevelChannel(const ChannelType channel_);
639ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk
640ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk    // Adjusts an image so that its orientation is suitable for viewing.
64195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void autoOrient(void);
642ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk
643092a8ea1959d818804462ea79231863dc2e3fd26dirk    // Forces all pixels below the threshold into black while leaving all
644092a8ea1959d818804462ea79231863dc2e3fd26dirk    // pixels at or above the threshold unchanged.
64595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void blackThreshold(const std::string &threshold_);
64695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void blackThresholdChannel(const ChannelType channel_,
64795f389652b69ee5487f18e744b7f54dcda1c733cdirk      const std::string &threshold_);
648092a8ea1959d818804462ea79231863dc2e3fd26dirk
649f27731d206fb6b9b791c0964837f85fa85883ed2dirk     // Simulate a scene at nighttime in the moonlight.
65095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void blueShift(const double factor_=1.5);
651f27731d206fb6b9b791c0964837f85fa85883ed2dirk
6523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Blur image with specified blur factor
6533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // The radius_ parameter specifies the radius of the Gaussian, in
6543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // pixels, not counting the center pixel.  The sigma_ parameter
6553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // specifies the standard deviation of the Laplacian, in pixels.
65695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void blur(const double radius_=0.0,const double sigma_=1.0);
65795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void blurChannel(const ChannelType channel_,const double radius_=0.0,
65895f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double sigma_=1.0);
659092a8ea1959d818804462ea79231863dc2e3fd26dirk
6603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Border image (add border to image)
66195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void border(const Geometry &geometry_=borderGeometryDefault);
6623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
663f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // Changes the brightness and/or contrast of an image. It converts the
664f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // brightness and contrast parameters into slope and intercept and calls
665f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // a polynomical function to apply to the image.
66695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void brightnessContrast(const double brightness_=0.0,
66795f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double contrast_=0.0);
66895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void brightnessContrastChannel(const ChannelType channel_,
66995f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double brightness_=0.0,const double contrast_=0.0);
670f27731d206fb6b9b791c0964837f85fa85883ed2dirk
671064bae341824f86d5e0b4e0010084c7a358704d7dirk    // Uses a multi-stage algorithm to detect a wide range of edges in images.
672064bae341824f86d5e0b4e0010084c7a358704d7dirk    void cannyEdge(const double radius_=0.0,const double sigma_=1.0,
673064bae341824f86d5e0b4e0010084c7a358704d7dirk      const double lowerPercent_=0.1,const double upperPercent_=0.3);
674064bae341824f86d5e0b4e0010084c7a358704d7dirk
6751f5fd5aeaee99fd19bacf7a1350ce73cd5ab1825dirk    // Accepts a lightweight Color Correction Collection
6761f5fd5aeaee99fd19bacf7a1350ce73cd5ab1825dirk    // (CCC) file which solely contains one or more color corrections and
6771f5fd5aeaee99fd19bacf7a1350ce73cd5ab1825dirk    // applies the correction to the image.
6781f5fd5aeaee99fd19bacf7a1350ce73cd5ab1825dirk    void cdl(const std::string &cdl_);
6791f5fd5aeaee99fd19bacf7a1350ce73cd5ab1825dirk
6803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Extract channel from image
68195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void channel(const ChannelType channel_);
6823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
6833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Charcoal effect image (looks like charcoal sketch)
6843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // The radius_ parameter specifies the radius of the Gaussian, in
6853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // pixels, not counting the center pixel.  The sigma_ parameter
6863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // specifies the standard deviation of the Laplacian, in pixels.
68795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void charcoal(const double radius_=0.0,const double sigma_=1.0);
6883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
6893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Chop image (remove vertical or horizontal subregion of image)
6903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // FIXME: describe how geometry argument is used to select either
6913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // horizontal or vertical subregion of image.
69295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void chop(const Geometry &geometry_);
6933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
69498e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    // Chromaticity blue primary point.
69598e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    void chromaBluePrimary(const double x_,const double y_,const double z_);
69698e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    void chromaBluePrimary(double *x_,double *y_,double *z_) const;
69795f389652b69ee5487f18e744b7f54dcda1c733cdirk
69898e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    // Chromaticity green primary point.
69998e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    void chromaGreenPrimary(const double x_,const double y_,const double z_);
70098e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    void chromaGreenPrimary(double *x_,double *y_,double *z_) const;
70195f389652b69ee5487f18e744b7f54dcda1c733cdirk
70298e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    // Chromaticity red primary point.
70398e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    void chromaRedPrimary(const double x_,const double y_,const double z_);
70498e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    void chromaRedPrimary(double *x_,double *y_,double *z_) const;
70595f389652b69ee5487f18e744b7f54dcda1c733cdirk
70698e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    // Chromaticity white point.
70798e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    void chromaWhitePoint(const double x_,const double y_,const double z_);
70898e4a9ab93295eb5a3db74ccf3e4e905c98b8f0edirk    void chromaWhitePoint(double *x_,double *y_,double *z_) const;
70995f389652b69ee5487f18e744b7f54dcda1c733cdirk
710f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // Set each pixel whose value is below zero to zero and any the
711f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // pixel whose value is above the quantum range to the quantum range (e.g.
712f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // 65535) otherwise the pixel value remains unchanged.
71395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void clamp(void);
71495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void clampChannel(const ChannelType channel_);
715f27731d206fb6b9b791c0964837f85fa85883ed2dirk
716d561b30050e85b31ba71c5dc15cc3ab3af403e65dirk    // Sets the image clip mask based on any clipping path information
717d561b30050e85b31ba71c5dc15cc3ab3af403e65dirk    // if it exists.
71895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void clip(void);
71995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void clipPath(const std::string pathname_,const bool inside_);
720d561b30050e85b31ba71c5dc15cc3ab3af403e65dirk
721f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // Apply a color lookup table (CLUT) to the image.
72295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void clut(const Image &clutImage_,const PixelInterpolateMethod method);
72395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void clutChannel(const ChannelType channel_,const Image &clutImage_,
72495f389652b69ee5487f18e744b7f54dcda1c733cdirk      const PixelInterpolateMethod method);
72595f389652b69ee5487f18e744b7f54dcda1c733cdirk
72695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Colorize image with pen color, using specified percent alpha.
72795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void colorize(const unsigned int alpha_,const Color &penColor_);
728f27731d206fb6b9b791c0964837f85fa85883ed2dirk
7294c08aed51c5899665ade97263692328eea4af106cristy    // Colorize image with pen color, using specified percent alpha
7303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // for red, green, and blue quantums
73195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void colorize(const unsigned int alphaRed_,const unsigned int alphaGreen_,
73295f389652b69ee5487f18e744b7f54dcda1c733cdirk       const unsigned int alphaBlue_,const Color &penColor_);
73395f389652b69ee5487f18e744b7f54dcda1c733cdirk
73495f389652b69ee5487f18e744b7f54dcda1c733cdirk     // Color at colormap position index_
73595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void colorMap(const size_t index_,const Color &color_);
73695f389652b69ee5487f18e744b7f54dcda1c733cdirk    Color colorMap(const size_t index_) const;
73795f389652b69ee5487f18e744b7f54dcda1c733cdirk
73895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Apply a color matrix to the image channels. The user supplied
739c8918bb2b224f642b06140506fa85a3703fa0748cristy    // matrix may be of order 1 to 5 (1x1 through 5x5).
74095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void colorMatrix(const size_t order_,const double *color_matrix_);
7413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
7423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Compare current image with another image
743181b2a74351daea0388a98b8e37e13efc53d42c9dirk    // False is returned if the images are not identical.
744181b2a74351daea0388a98b8e37e13efc53d42c9dirk    bool compare(const Image &reference_) const;
7453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
74641c73241c91f5a5debf9380cdcff10f26aa04cc3dirk    // Compare current image with another image
74741c73241c91f5a5debf9380cdcff10f26aa04cc3dirk    // Returns the distortion based on the specified metric.
74895f389652b69ee5487f18e744b7f54dcda1c733cdirk    double compare(const Image &reference_,const MetricType metric_);
74995f389652b69ee5487f18e744b7f54dcda1c733cdirk    double compareChannel(const ChannelType channel_,
75041c73241c91f5a5debf9380cdcff10f26aa04cc3dirk                                     const Image &reference_,
75141c73241c91f5a5debf9380cdcff10f26aa04cc3dirk                                     const MetricType metric_ );
75241c73241c91f5a5debf9380cdcff10f26aa04cc3dirk
75341c73241c91f5a5debf9380cdcff10f26aa04cc3dirk    // Compare current image with another image
75441c73241c91f5a5debf9380cdcff10f26aa04cc3dirk    // Sets the distortion and returns the difference image.
75595f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image compare(const Image &reference_,const MetricType metric_,
75695f389652b69ee5487f18e744b7f54dcda1c733cdirk      double *distortion);
75795f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image compareChannel(const ChannelType channel_,const Image &reference_,
75895f389652b69ee5487f18e744b7f54dcda1c733cdirk      const MetricType metric_,double *distortion);
75941c73241c91f5a5debf9380cdcff10f26aa04cc3dirk
7603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Compose an image onto another at specified offset and using
7613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // specified algorithm
76295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void composite(const Image &compositeImage_,const Geometry &offset_,
76395f389652b69ee5487f18e744b7f54dcda1c733cdirk      const CompositeOperator compose_=InCompositeOp);
76495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void composite(const Image &compositeImage_,const GravityType gravity_,
76595f389652b69ee5487f18e744b7f54dcda1c733cdirk      const CompositeOperator compose_=InCompositeOp);
76695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void composite(const Image &compositeImage_,const ::ssize_t xOffset_,
76795f389652b69ee5487f18e744b7f54dcda1c733cdirk      const ::ssize_t yOffset_,const CompositeOperator compose_=InCompositeOp);
768f27731d206fb6b9b791c0964837f85fa85883ed2dirk
7694ab21d079ec146c4c106925c683a8f9398980856dirk    // Determines the connected-components of the image
7704ab21d079ec146c4c106925c683a8f9398980856dirk    void connectedComponents(const size_t connectivity_);
7714ab21d079ec146c4c106925c683a8f9398980856dirk
7723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Contrast image (enhance intensity differences in image)
773eb68e91158bc0035e3a4aeddf4b99fa09f15493ddirk    void contrast(const bool sharpen_);
7743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
775f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // A simple image enhancement technique that attempts to improve the
776f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // contrast in an image by 'stretching' the range of intensity values
777f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // it contains to span a desired range of values. It differs from the
778f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // more sophisticated histogram equalization in that it can only apply a
779f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // linear scaling function to the image pixel values. As a result the
780f27731d206fb6b9b791c0964837f85fa85883ed2dirk    // 'enhancement' is less harsh.
7811940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void contrastStretch(const double blackPoint_,const double whitePoint_);
78295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void contrastStretchChannel(const ChannelType channel_,
7831940fe06f035ea32a4ec4df61f6897396877aa3cdirk      const double blackPoint_,const double whitePoint_);
784f27731d206fb6b9b791c0964837f85fa85883ed2dirk
7853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Convolve image.  Applies a user-specified convolution to the image.
7863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  order_ represents the number of columns and rows in the filter kernel.
7873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  kernel_ is an array of doubles representing the convolution kernel.
78895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void convolve(const size_t order_,const double *kernel_);
7893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
7901f5fd5aeaee99fd19bacf7a1350ce73cd5ab1825dirk    // Copies pixels from the source image as defined by the geometry the
7911f5fd5aeaee99fd19bacf7a1350ce73cd5ab1825dirk    // destination image at the specified offset.
7921f5fd5aeaee99fd19bacf7a1350ce73cd5ab1825dirk    void copyPixels(const Image &source_,const Geometry &geometry_,
7931f5fd5aeaee99fd19bacf7a1350ce73cd5ab1825dirk      const Offset &offset_);
7941f5fd5aeaee99fd19bacf7a1350ce73cd5ab1825dirk
7953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Crop image (subregion of original image)
79695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void crop(const Geometry &geometry_);
7975fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
7983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Cycle image colormap
79995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void cycleColormap(const ::ssize_t amount_);
8005fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
8015fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // Converts cipher pixels to plain pixels.
80295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void decipher(const std::string &passphrase_);
80395f389652b69ee5487f18e744b7f54dcda1c733cdirk
8041940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Tagged image format define. Similar to the defineValue() method
8051940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // except that passing the flag_ value 'true' creates a value-less
8061940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // define with that format and key. Passing the flag_ value 'false'
8071940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // removes any existing matching definition. The method returns 'true'
8081940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // if a matching key exists, and 'false' if no matching key exists.
8091940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void defineSet(const std::string &magick_,const std::string &key_,
8101940fe06f035ea32a4ec4df61f6897396877aa3cdirk      bool flag_);
8111940fe06f035ea32a4ec4df61f6897396877aa3cdirk    bool defineSet(const std::string &magick_,const std::string &key_) const;
8121940fe06f035ea32a4ec4df61f6897396877aa3cdirk
81395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Tagged image format define (set/access coder-specific option) The
81495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // magick_ option specifies the coder the define applies to.  The key_
81595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // option provides the key specific to that coder.  The value_ option
81695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // provides the value to set (if any). See the defineSet() method if the
81795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // key must be removed entirely.
81895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void defineValue(const std::string &magick_,const std::string &key_,
81995f389652b69ee5487f18e744b7f54dcda1c733cdirk      const std::string &value_);
82095f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string defineValue(const std::string &magick_,
82195f389652b69ee5487f18e744b7f54dcda1c733cdirk      const std::string &key_) const;
82295f389652b69ee5487f18e744b7f54dcda1c733cdirk
8235fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // Removes skew from the image. Skew is an artifact that occurs in scanned
8245fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // images because of the camera being misaligned, imperfections in the
8255fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // scanning or surface, or simply because the paper was not placed
8265fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // completely flat when scanned. The value of threshold_ ranges from 0
8275fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // to QuantumRange.
82895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void deskew(const double threshold_);
8295fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
8303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Despeckle image (reduce speckle noise)
83195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void despeckle(void);
8325fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
8333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Display image on screen
83495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void display(void);
8353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
8363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Distort image.  distorts an image using various distortion methods, by
8373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // mapping color lookups of the source image to a new destination image
8383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // usally of the same size as the source image, unless 'bestfit' is set to
8393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // true.
840827944d54938c1f8a74ff53cd35c11801060d995dirk    void distort(const DistortMethod method_,
84195f389652b69ee5487f18e744b7f54dcda1c733cdirk      const size_t numberArguments_,const double *arguments_,
84295f389652b69ee5487f18e744b7f54dcda1c733cdirk      const bool bestfit_=false);
8433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
8443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Draw on image using a single drawable
84595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void draw(const Drawable &drawable_);
8463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
8473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Draw on image using a drawable list
848263b876b613ee3cddda42810a4b421a73895327cdirk    void draw(const std::vector<Magick::Drawable> &drawable_);
8495fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
8503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Edge image (hilight edges in image)
85195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void edge(const double radius_=0.0);
8525fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
8533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Emboss image (hilight edges with 3D effect)
8543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // The radius_ parameter specifies the radius of the Gaussian, in
8553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // pixels, not counting the center pixel.  The sigma_ parameter
8563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // specifies the standard deviation of the Laplacian, in pixels.
85795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void emboss(const double radius_=0.0,const double sigma_=1.0);
8585fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
8595fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // Converts pixels to cipher-pixels.
86095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void encipher(const std::string &passphrase_);
8615fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
8623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Enhance image (minimize noise)
86395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void enhance(void);
86495f389652b69ee5487f18e744b7f54dcda1c733cdirk
8653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Equalize image (histogram equalization)
86695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void equalize(void);
8673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
8683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Erase image to current "background color"
86995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void erase(void);
8705fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
8715d4260ad9e283f1351524d0d2745560fc853e977dirk    // Apply a value with an arithmetic, relational, or logical operator.
8725d4260ad9e283f1351524d0d2745560fc853e977dirk    void evaluate(const ChannelType channel_,
8735d4260ad9e283f1351524d0d2745560fc853e977dirk      const MagickEvaluateOperator operator_,double rvalue_);
8745d4260ad9e283f1351524d0d2745560fc853e977dirk
8755d4260ad9e283f1351524d0d2745560fc853e977dirk    // Apply a value with an arithmetic, relational, or logical operator.
8760634367b7f22185171e7cd6e6ddc890db11951efdirk    void evaluate(const ChannelType channel_,const MagickFunction function_,
8770634367b7f22185171e7cd6e6ddc890db11951efdirk      const size_t number_parameters_,const double *parameters_);
8780634367b7f22185171e7cd6e6ddc890db11951efdirk
8790634367b7f22185171e7cd6e6ddc890db11951efdirk    // Apply a value with an arithmetic, relational, or logical operator.
8800634367b7f22185171e7cd6e6ddc890db11951efdirk    void evaluate(const ChannelType channel_,const ::ssize_t x_,
8810634367b7f22185171e7cd6e6ddc890db11951efdirk      const ::ssize_t y_,const size_t columns_,const size_t rows_,
8825d4260ad9e283f1351524d0d2745560fc853e977dirk      const MagickEvaluateOperator operator_,const double rvalue_);
8835d4260ad9e283f1351524d0d2745560fc853e977dirk
8843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Extend the image as defined by the geometry.
88595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void extent(const Geometry &geometry_);
88695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void extent(const Geometry &geometry_,const Color &backgroundColor);
88795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void extent(const Geometry &geometry_,const Color &backgroundColor,
88895f389652b69ee5487f18e744b7f54dcda1c733cdirk      const GravityType gravity_);
88995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void extent(const Geometry &geometry_,const GravityType gravity_);
8905fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
8913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Flip image (reflect each scanline in the vertical direction)
89295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void flip(void);
8933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
8941940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Floodfill pixels matching color (within fuzz factor) of target
895223843f66554713ee926b09f958ff6bfdb5acb61dirk    // pixel(x,y) with replacement alpha value.
8961940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void floodFillAlpha(const ::ssize_t x_,const ::ssize_t y_,
897223843f66554713ee926b09f958ff6bfdb5acb61dirk      const unsigned int alpha_,const bool invert_=false);
898223843f66554713ee926b09f958ff6bfdb5acb61dirk
899223843f66554713ee926b09f958ff6bfdb5acb61dirk    // Floodfill designated area with replacement alpha value
900223843f66554713ee926b09f958ff6bfdb5acb61dirk    void floodFillAlpha(const ssize_t x_,const ssize_t y_,
901223843f66554713ee926b09f958ff6bfdb5acb61dirk      const unsigned int alpha_,const Color &target_,const bool invert_=false);
9021940fe06f035ea32a4ec4df61f6897396877aa3cdirk
9033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Flood-fill color across pixels that match the color of the
9043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // target pixel and are neighbors of the target pixel.
9053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Uses current fuzz setting when determining color match.
906223843f66554713ee926b09f958ff6bfdb5acb61dirk    void floodFillColor(const Geometry &point_,const Color &fillColor_,
907223843f66554713ee926b09f958ff6bfdb5acb61dirk      const bool invert_=false);
90895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void floodFillColor(const ::ssize_t x_,const ::ssize_t y_,
909223843f66554713ee926b09f958ff6bfdb5acb61dirk      const Color &fillColor_,const bool invert_=false);
9103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
9113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Flood-fill color across pixels starting at target-pixel and
9123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // stopping at pixels matching specified border color.
9133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Uses current fuzz setting when determining color match.
91495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void floodFillColor(const Geometry &point_,const Color &fillColor_,
915223843f66554713ee926b09f958ff6bfdb5acb61dirk      const Color &borderColor_,const bool invert_=false);
9161940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void floodFillColor(const ::ssize_t x_,const ::ssize_t y_,
917223843f66554713ee926b09f958ff6bfdb5acb61dirk      const Color &fillColor_,const Color &borderColor_,
918223843f66554713ee926b09f958ff6bfdb5acb61dirk      const bool invert_=false);
9193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
9203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Flood-fill texture across pixels that match the color of the
9213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // target pixel and are neighbors of the target pixel.
9223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Uses current fuzz setting when determining color match.
923223843f66554713ee926b09f958ff6bfdb5acb61dirk    void floodFillTexture(const Geometry &point_,const Image &texture_,
924223843f66554713ee926b09f958ff6bfdb5acb61dirk      const bool invert_=false);
92595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void floodFillTexture(const ::ssize_t x_,const ::ssize_t y_,
926223843f66554713ee926b09f958ff6bfdb5acb61dirk      const Image &texture_,const bool invert_=false);
9273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
9283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Flood-fill texture across pixels starting at target-pixel and
9293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // stopping at pixels matching specified border color.
9303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Uses current fuzz setting when determining color match.
93195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void floodFillTexture(const Geometry &point_,const Image &texture_,
932223843f66554713ee926b09f958ff6bfdb5acb61dirk      const Color &borderColor_,const bool invert_=false);
9331940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void floodFillTexture(const ::ssize_t x_,const ::ssize_t y_,
934223843f66554713ee926b09f958ff6bfdb5acb61dirk      const Image &texture_,const Color &borderColor_,
935223843f66554713ee926b09f958ff6bfdb5acb61dirk      const bool invert_=false);
9365fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
9373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Flop image (reflect each scanline in the horizontal direction)
93895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void flop(void);
93995f389652b69ee5487f18e744b7f54dcda1c733cdirk
94095f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Obtain font metrics for text string given current font,
94195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // pointsize, and density settings.
94295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void fontTypeMetrics(const std::string &text_,TypeMetric *metrics);
9435fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
944e6e40ada97dd07b629238f845f92c9c0b75dc487dirk    // Obtain multi line font metrics for text string given current font,
945e6e40ada97dd07b629238f845f92c9c0b75dc487dirk    // pointsize, and density settings.
946e6e40ada97dd07b629238f845f92c9c0b75dc487dirk    void fontTypeMetricsMultiline(const std::string &text_,
947e6e40ada97dd07b629238f845f92c9c0b75dc487dirk      TypeMetric *metrics);
948e6e40ada97dd07b629238f845f92c9c0b75dc487dirk
9493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Frame image
95095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void frame(const Geometry &geometry_=frameGeometryDefault);
95195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void frame(const size_t width_,const size_t height_,
95295f389652b69ee5487f18e744b7f54dcda1c733cdirk      const ::ssize_t innerBevel_=6,const ::ssize_t outerBevel_=6);
9533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
9543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Applies a mathematical expression to the image.
9551940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void fx(const std::string expression_);
9561940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void fx(const std::string expression_,const Magick::ChannelType channel_);
9575fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
9583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Gamma correct image
95995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void gamma(const double gamma_);
96095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void gamma(const double gammaRed_,const double gammaGreen_,
96195f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double gammaBlue_);
9623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
9633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Gaussian blur image
9643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // The number of neighbor pixels to be included in the convolution
965b5af2acfbf05cc6af1fc4a69d1fda2f497ca9719dirk    // mask is specified by 'radius_'. The standard deviation of the
9663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // gaussian bell curve is specified by 'sigma_'.
967b5af2acfbf05cc6af1fc4a69d1fda2f497ca9719dirk    void gaussianBlur(const double radius_,const double sigma_);
968b5af2acfbf05cc6af1fc4a69d1fda2f497ca9719dirk    void gaussianBlurChannel(const ChannelType channel_,const double radius_,
96995f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double sigma_);
97095f389652b69ee5487f18e744b7f54dcda1c733cdirk
97195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Transfers read-only pixels from the image to the pixel cache as
97295f389652b69ee5487f18e744b7f54dcda1c733cdirk    // defined by the specified region
97395f389652b69ee5487f18e744b7f54dcda1c733cdirk    const Quantum *getConstPixels(const ::ssize_t x_, const ::ssize_t y_,
97495f389652b69ee5487f18e744b7f54dcda1c733cdirk      const size_t columns_,const size_t rows_) const;
97595f389652b69ee5487f18e744b7f54dcda1c733cdirk
97695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Obtain immutable image pixel metacontent (valid for PseudoClass images)
97795f389652b69ee5487f18e744b7f54dcda1c733cdirk    const void *getConstMetacontent(void) const;
97895f389652b69ee5487f18e744b7f54dcda1c733cdirk
97995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Obtain mutable image pixel metacontent (valid for PseudoClass images)
98095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void *getMetacontent(void);
98195f389652b69ee5487f18e744b7f54dcda1c733cdirk
98295f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Transfers pixels from the image to the pixel cache as defined
98395f389652b69ee5487f18e744b7f54dcda1c733cdirk    // by the specified region. Modified pixels may be subsequently
98495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // transferred back to the image via syncPixels.  This method is
98595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // valid for DirectClass images.
98695f389652b69ee5487f18e744b7f54dcda1c733cdirk    Quantum *getPixels(const ::ssize_t x_,const ::ssize_t y_,
98795f389652b69ee5487f18e744b7f54dcda1c733cdirk      const size_t columns_,const size_t rows_);
988b32b90a7e1ee2275333589072c496b5f69e17feccristy
98948f358a1cd1920311b1f884d79829788200ccc2ddirk    // Converts the colors in the image to gray.
9907f150fdaccb38c6289ee9f3f2230b6ed3b0a56d0dirk    void grayscale(const PixelIntensityMethod method_);
99148f358a1cd1920311b1f884d79829788200ccc2ddirk
992b32b90a7e1ee2275333589072c496b5f69e17feccristy    // Apply a color lookup table (Hald CLUT) to the image.
99395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void haldClut(const Image &clutImage_);
994b32b90a7e1ee2275333589072c496b5f69e17feccristy
995c8c49d48975358aa8c6e14e113ef4c135e90b212dirk    // Identifies lines in the image.
996c8c49d48975358aa8c6e14e113ef4c135e90b212dirk    void houghLine(const size_t width_,const size_t height_,
997c8c49d48975358aa8c6e14e113ef4c135e90b212dirk      const size_t threshold_=40);
998c8c49d48975358aa8c6e14e113ef4c135e90b212dirk
999ab4f0bb4e2c2d3e3e61408499755fa710f15e18fdirk    // Identifies the potential color type of the image. This method can be
1000ab4f0bb4e2c2d3e3e61408499755fa710f15e18fdirk    // used to detect if the type can be changed to GrayScale.
1001ab4f0bb4e2c2d3e3e61408499755fa710f15e18fdirk    ImageType identifyType(void) const;
1002ab4f0bb4e2c2d3e3e61408499755fa710f15e18fdirk
10033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Implode image (special effect)
100495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void implode(const double factor_);
10055fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
10065fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // Implements the inverse discrete Fourier transform (DFT) of the image
1007529fcc251289b181417ebc355b221dcaa91b1611cristy    // either as a magnitude / phase or real / imaginary image pair.
100895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void inverseFourierTransform(const Image &phase_);
100995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void inverseFourierTransform(const Image &phase_,const bool magnitude_);
10105fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
1011a6045f5b5bf02334dab8f587e5284dd4fc0e2806dirk    // An edge preserving noise reduction filter.
10124412c6816cd42de22d222b5a03938e9e0797efb3dirk    void kuwahara(const double radius_=0.0,const double sigma_=1.0);
10134412c6816cd42de22d222b5a03938e9e0797efb3dirk    void kuwaharaChannel(const ChannelType channel_,const double radius_=0.0,
10144412c6816cd42de22d222b5a03938e9e0797efb3dirk      const double sigma_=1.0);
1015a6045f5b5bf02334dab8f587e5284dd4fc0e2806dirk
10163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Level image. Adjust the levels of the image by scaling the
10173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // colors falling between specified white and black points to the
10183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // full available quantum range. The parameters provided represent
10193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // the black, mid (gamma), and white points.  The black point
10203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // specifies the darkest color in the image. Colors darker than
10213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // the black point are set to zero. Mid point (gamma) specifies a
10223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // gamma correction to apply to the image. White point specifies
10233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // the lightest color in the image.  Colors brighter than the
10243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // white point are set to the maximum quantum value. The black and
10253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // white point have the valid range 0 to QuantumRange while mid (gamma)
10263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // has a useful range of 0 to ten.
102795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void level(const double blackPoint_,const double whitePoint_,
102895f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double gamma_=1.0);
102995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void levelChannel(const ChannelType channel_,const double blackPoint_,
103095f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double whitePoint_,const double gamma_=1.0);
10315fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk
10325fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // Maps the given color to "black" and "white" values, linearly spreading
10335fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // out the colors, and level values on a channel by channel bases, as
10345fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // per level(). The given colors allows you to specify different level
10355fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk    // ranges for each of the color channels separately.
103695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void levelColors(const Color &blackColor_,const Color &whiteColor_,
103795f389652b69ee5487f18e744b7f54dcda1c733cdirk      const bool invert_=true);
103895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void levelColorsChannel(const ChannelType channel_,
103995f389652b69ee5487f18e744b7f54dcda1c733cdirk      const Color &blackColor_,const Color &whiteColor_,
104095f389652b69ee5487f18e744b7f54dcda1c733cdirk      const bool invert_=true);
10413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
10427907f552405706a71b28bdbd6bf34e7100d6de31dirk    // Levelize applies the reversed level operation to just the specific
10437907f552405706a71b28bdbd6bf34e7100d6de31dirk    // channels specified.It compresses the full range of color values, so
10447907f552405706a71b28bdbd6bf34e7100d6de31dirk    // that they lie between the given black and white points. Gamma is
10457907f552405706a71b28bdbd6bf34e7100d6de31dirk    // applied before the values are mapped.
10467907f552405706a71b28bdbd6bf34e7100d6de31dirk    void levelize(const double blackPoint_,const double whitePoint_,
10477907f552405706a71b28bdbd6bf34e7100d6de31dirk      const double gamma_=1.0);
10487907f552405706a71b28bdbd6bf34e7100d6de31dirk    void levelizeChannel(const ChannelType channel_,const double blackPoint_,
10497907f552405706a71b28bdbd6bf34e7100d6de31dirk      const double whitePoint_,const double gamma_=1.0);
10507907f552405706a71b28bdbd6bf34e7100d6de31dirk
10511bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // Discards any pixels below the black point and above the white point and
10521bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // levels the remaining pixels.
105395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void linearStretch(const double blackPoint_,const double whitePoint_);
10541bab013cd87579204c8eb4671e3e658ef49d9aaadirk
10551bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // Rescales image with seam carving.
105695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void liquidRescale(const Geometry &geometry_);
10571bab013cd87579204c8eb4671e3e658ef49d9aaadirk
1058be80460638d2432ed6f7bdc93be1b342e30f6e9cdirk    // Local contrast enhancement
1059be80460638d2432ed6f7bdc93be1b342e30f6e9cdirk    void localContrast(const double radius_,const double strength_);
1060be80460638d2432ed6f7bdc93be1b342e30f6e9cdirk
10613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Magnify image by integral size
106295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void magnify(void);
10631bab013cd87579204c8eb4671e3e658ef49d9aaadirk
10643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Remap image colors with closest color from reference image
106595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void map(const Image &mapImage_,const bool dither_=false);
10663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
10673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Filter image by replacing each pixel component with the median
10683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // color in a circular neighborhood
106995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void medianFilter(const double radius_=0.0);
10701bab013cd87579204c8eb4671e3e658ef49d9aaadirk
10713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Reduce image by integral size
107295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void minify(void);
10731bab013cd87579204c8eb4671e3e658ef49d9aaadirk
10743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Modulate percent hue, saturation, and brightness of an image
107595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void modulate(const double brightness_,const double saturation_,
107695f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double hue_);
10771bab013cd87579204c8eb4671e3e658ef49d9aaadirk
1078617c1234f713a6b7068e2a5abbf94a23f77c8181dirk    // Returns the normalized moments of one or more image channels.
1079100c62ceee252ed475fca6a57b3dbaa3d27d2ed9dirk    ImageMoments moments(void) const;
1080617c1234f713a6b7068e2a5abbf94a23f77c8181dirk
10813648685f9a848931845044f9da77dccc4cc4f480dirk    // Applies a kernel to the image according to the given mophology method.
10823648685f9a848931845044f9da77dccc4cc4f480dirk    void morphology(const MorphologyMethod method_,const std::string kernel_,
10833648685f9a848931845044f9da77dccc4cc4f480dirk      const ssize_t iterations_=1);
10843648685f9a848931845044f9da77dccc4cc4f480dirk    void morphology(const MorphologyMethod method_,
10853648685f9a848931845044f9da77dccc4cc4f480dirk      const KernelInfoType kernel_,const std::string arguments_,
10863648685f9a848931845044f9da77dccc4cc4f480dirk      const ssize_t iterations_=1);
10873648685f9a848931845044f9da77dccc4cc4f480dirk    void morphologyChannel(const ChannelType channel_,
10883648685f9a848931845044f9da77dccc4cc4f480dirk      const MorphologyMethod method_,const std::string kernel_,
10893648685f9a848931845044f9da77dccc4cc4f480dirk      const ssize_t iterations_=1);
10903648685f9a848931845044f9da77dccc4cc4f480dirk    void morphologyChannel(const ChannelType channel_,
10913648685f9a848931845044f9da77dccc4cc4f480dirk      const MorphologyMethod method_,const KernelInfoType kernel_,
10923648685f9a848931845044f9da77dccc4cc4f480dirk      const std::string arguments_,const ssize_t iterations_=1);
10933648685f9a848931845044f9da77dccc4cc4f480dirk
10943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Motion blur image with specified blur factor
10953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // The radius_ parameter specifies the radius of the Gaussian, in
10963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // pixels, not counting the center pixel.  The sigma_ parameter
10973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // specifies the standard deviation of the Laplacian, in pixels.
10983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // The angle_ parameter specifies the angle the object appears
10993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // to be comming from (zero degrees is from the right).
110095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void motionBlur(const double radius_,const double sigma_,
110195f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double angle_);
11021bab013cd87579204c8eb4671e3e658ef49d9aaadirk
11033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Negate colors in image.  Set grayscale to only negate grayscale
11043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // values in image.
110595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void negate(const bool grayscale_=false);
110695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void negateChannel(const ChannelType channel_,const bool grayscale_=false);
11071bab013cd87579204c8eb4671e3e658ef49d9aaadirk
11083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Normalize image (increase contrast by normalizing the pixel
11093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // values to span the full range of color values)
111095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void normalize(void);
11113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
11121bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // Oilpaint image (image looks like oil painting)
111395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void oilPaint(const double radius_=0.0,const double sigma=1.0);
11143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
11153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Change color of opaque pixel to specified pen color.
1116a3af1222eb218de7eae918dcf92d2d3f8996271ddirk    void opaque(const Color &opaqueColor_,const Color &penColor_,
1117a3af1222eb218de7eae918dcf92d2d3f8996271ddirk      const bool invert_=false);
11181bab013cd87579204c8eb4671e3e658ef49d9aaadirk
1119f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // Perform a ordered dither based on a number of pre-defined dithering
1120f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // threshold maps, but over multiple intensity levels.
1121f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    void orderedDither(std::string thresholdMap_);
1122f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    void orderedDitherChannel(const ChannelType channel_,
1123f1775d8f60a3ce551a096140d7559d46ba33ac14dirk      std::string thresholdMap_);
1124f1775d8f60a3ce551a096140d7559d46ba33ac14dirk
11251bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // Set each pixel whose value is less than epsilon to epsilon or
11261bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // -epsilon (whichever is closer) otherwise the pixel value remains
11271bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // unchanged.
112895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void perceptible(const double epsilon_);
112995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void perceptibleChannel(const ChannelType channel_,const double epsilon_);
11303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
1131e316d154e7b050fab78dbf86b33f0797594939cadirk    // Returns the perceptual hash for this image.
1132100c62ceee252ed475fca6a57b3dbaa3d27d2ed9dirk    Magick::ImagePerceptualHash perceptualHash() const;
1133e316d154e7b050fab78dbf86b33f0797594939cadirk
11343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Ping is similar to read except only enough of the image is read
11353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // to determine the image columns, rows, and filesize.  Access the
11363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // columns(), rows(), and fileSize() attributes after invoking
11373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // ping.  The image data is not valid after calling ping.
113895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void ping(const std::string &imageSpec_);
11391bab013cd87579204c8eb4671e3e658ef49d9aaadirk
11403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Ping is similar to read except only enough of the image is read
11413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // to determine the image columns, rows, and filesize.  Access the
11423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // columns(), rows(), and fileSize() attributes after invoking
11433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // ping.  The image data is not valid after calling ping.
114495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void ping(const Blob &blob_);
114595f389652b69ee5487f18e744b7f54dcda1c733cdirk
114695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Get/set pixel color at location x & y.
114795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void pixelColor(const ::ssize_t x_,const ::ssize_t y_,const Color &color_);
114895f389652b69ee5487f18e744b7f54dcda1c733cdirk    Color pixelColor(const ::ssize_t x_,const ::ssize_t y_ ) const;
114995f389652b69ee5487f18e744b7f54dcda1c733cdirk
11501bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // Simulates a Polaroid picture.
115195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void polaroid(const std::string &caption_,const double angle_,
115295f389652b69ee5487f18e744b7f54dcda1c733cdirk      const PixelInterpolateMethod method_);
11531bab013cd87579204c8eb4671e3e658ef49d9aaadirk
11541bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // Reduces the image to a limited number of colors for a "poster" effect.
115595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void posterize(const size_t levels_,const DitherMethod method_);
115695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void posterizeChannel(const ChannelType channel_,const size_t levels_,
115795f389652b69ee5487f18e744b7f54dcda1c733cdirk      const DitherMethod method_);
11581bab013cd87579204c8eb4671e3e658ef49d9aaadirk
11591bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // Execute a named process module using an argc/argv syntax similar to
11601bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // that accepted by a C 'main' routine. An exception is thrown if the
11611bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // requested process module doesn't exist, fails to load, or fails during
11621bab013cd87579204c8eb4671e3e658ef49d9aaadirk    // execution.
116395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void process(std::string name_,const ::ssize_t argc_,const char **argv_);
11641bab013cd87579204c8eb4671e3e658ef49d9aaadirk
11651940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Add or remove a named profile to/from the image. Remove the
11661940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // profile by passing an empty Blob (e.g. Blob()). Valid names are
11671940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // "*", "8BIM", "ICM", "IPTC", or a user/format-defined profile name.
11681940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void profile(const std::string name_,const Blob &colorProfile_);
11691940fe06f035ea32a4ec4df61f6897396877aa3cdirk
11701940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Retrieve a named profile from the image. Valid names are:
11711940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // "8BIM", "8BIMTEXT", "APP1", "APP1JPEG", "ICC", "ICM", & "IPTC"
11721940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // or an existing user/format-defined profile name.
11731940fe06f035ea32a4ec4df61f6897396877aa3cdirk    Blob profile(const std::string name_) const;
11741940fe06f035ea32a4ec4df61f6897396877aa3cdirk
11753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Quantize image (reduce number of colors)
117695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void quantize(const bool measureError_=false);
11773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
11783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Raise image (lighten or darken the edges of an image to give a
11793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // 3-D raised or lowered effect)
118095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void raise(const Geometry &geometry_=raiseGeometryDefault,
118195f389652b69ee5487f18e744b7f54dcda1c733cdirk      const bool raisedFlag_=false);
11823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
11833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Random threshold image.
11843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //
11853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Changes the value of individual pixels based on the intensity
11863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // of each pixel compared to a random threshold.  The result is a
11878352b50e85321562d27f6a90aa7d461afa0c1df0dirk    // low-contrast, two color image.
11888352b50e85321562d27f6a90aa7d461afa0c1df0dirk    void randomThreshold(const double low_,const double high_);
11898352b50e85321562d27f6a90aa7d461afa0c1df0dirk    void randomThresholdChannel(const ChannelType channel_,const double low_,
11908352b50e85321562d27f6a90aa7d461afa0c1df0dirk      const double high_);
11913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
11923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Read single image frame from in-memory BLOB
119395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void read(const Blob &blob_);
11943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
11953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Read single image frame of specified size from in-memory BLOB
119695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void read(const Blob &blob_,const Geometry &size_);
11973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
11983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Read single image frame of specified size and depth from
11993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // in-memory BLOB
120095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void read(const Blob &blob_,const Geometry &size_,const size_t depth_);
12013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
12023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Read single image frame of specified size, depth, and format
12033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // from in-memory BLOB
120495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void read(const Blob &blob_,const Geometry &size_,const size_t depth_,
120595f389652b69ee5487f18e744b7f54dcda1c733cdirk      const std::string &magick_);
12063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
12073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Read single image frame of specified size, and format from
12083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // in-memory BLOB
120995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void read(const Blob &blob_,const Geometry &size_,
121095f389652b69ee5487f18e744b7f54dcda1c733cdirk      const std::string &magick_);
121195f389652b69ee5487f18e744b7f54dcda1c733cdirk
121295f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Read single image frame of specified size into current object
121395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void read(const Geometry &size_,const std::string &imageSpec_);
121495f389652b69ee5487f18e744b7f54dcda1c733cdirk
12153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Read single image frame from an array of raw pixels, with
12163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // specified storage type (ConstituteImage), e.g.
121795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // image.read( 640, 480, "RGB", 0, pixels );
12181940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void read(const size_t width_,const size_t height_,const std::string &map_,
12191940fe06f035ea32a4ec4df61f6897396877aa3cdirk      const StorageType type_,const void *pixels_);
122095f389652b69ee5487f18e744b7f54dcda1c733cdirk
122195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Read single image frame into current object
122295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void read(const std::string &imageSpec_);
12233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
1224af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    // Associate a mask with the image. The mask must be the same dimensions
1225af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    // as the image. Pass an invalid image to unset an existing mask.
1226af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    void readMask(const Image &mask_);
1227af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    Image readMask(void) const;
1228af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk
12291940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Transfers one or more pixel components from a buffer or file
12301940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // into the image pixel cache of an image.
12311940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Used to support image decoders.
12321940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void readPixels(const QuantumType quantum_,const unsigned char *source_);
12331940fe06f035ea32a4ec4df61f6897396877aa3cdirk
12343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Reduce noise in image using a noise peak elimination filter
123595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void reduceNoise(void);
123697bcd8db015ea3519828dd0b2f738517825b73c3dirk    void reduceNoise(const size_t order_);
123795f389652b69ee5487f18e744b7f54dcda1c733cdirk
1238cd27554467f87f94cd4b4880530239264e379467dirk    // Resets the image page canvas and position.
1239cd27554467f87f94cd4b4880530239264e379467dirk    void repage();
1240cd27554467f87f94cd4b4880530239264e379467dirk
1241f8c6db577bf34604c1b62d0ac8ae0a3010750493dirk    // Resize image in terms of its pixel size.
1242c3723b409bfe442938f3a58a16d4723216d3e1d6dirk    void resample(const Point &density_);
1243f8c6db577bf34604c1b62d0ac8ae0a3010750493dirk
12443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Resize image to specified size.
124595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void resize(const Geometry &geometry_);
12463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
12473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Roll image (rolls image vertically and horizontally) by specified
12483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // number of columnms and rows)
124995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void roll(const Geometry &roll_);
125095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void roll(const size_t columns_,const size_t rows_);
125195f389652b69ee5487f18e744b7f54dcda1c733cdirk
12523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Rotate image counter-clockwise by specified number of degrees.
125395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void rotate(const double degrees_);
125495f389652b69ee5487f18e744b7f54dcda1c733cdirk
12556d612cf866ac2d4bae9e21f95b035f8bf50c6f28dirk    // Rotational blur image.
12566d612cf866ac2d4bae9e21f95b035f8bf50c6f28dirk    void rotationalBlur(const double angle_);
12576d612cf866ac2d4bae9e21f95b035f8bf50c6f28dirk    void rotationalBlurChannel(const ChannelType channel_,const double angle_);
12586d612cf866ac2d4bae9e21f95b035f8bf50c6f28dirk
12593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Resize image by using pixel sampling algorithm
126095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void sample(const Geometry &geometry_);
126195f389652b69ee5487f18e744b7f54dcda1c733cdirk
12623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Resize image by using simple ratio algorithm
126395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void scale(const Geometry &geometry_);
126495f389652b69ee5487f18e744b7f54dcda1c733cdirk
12653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Segment (coalesce similar image components) by analyzing the
12663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // histograms of the color components and identifying units that
12673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // are homogeneous with the fuzzy c-means technique.  Also uses
12683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // QuantizeColorSpace and Verbose image attributes
126995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void segment(const double clusterThreshold_=1.0,
127095f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double smoothingThreshold_=1.5);
127195f389652b69ee5487f18e744b7f54dcda1c733cdirk
1272f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // Selectively blur pixels within a contrast threshold. It is similar to
1273f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // the unsharpen mask that sharpens everything with contrast above a
1274f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // certain threshold.
1275f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    void selectiveBlur(const double radius_,const double sigma_,
1276f1775d8f60a3ce551a096140d7559d46ba33ac14dirk      const double threshold_);
1277f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    void selectiveBlurChannel(const ChannelType channel_,const double radius_,
1278f1775d8f60a3ce551a096140d7559d46ba33ac14dirk      const double sigma_,const double threshold_);
1279f1775d8f60a3ce551a096140d7559d46ba33ac14dirk
1280f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // Separates a channel from the image and returns it as a grayscale image.
1281100c62ceee252ed475fca6a57b3dbaa3d27d2ed9dirk    Image separate(const ChannelType channel_) const;
1282f1775d8f60a3ce551a096140d7559d46ba33ac14dirk
1283f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // Applies a special effect to the image, similar to the effect achieved in
1284f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // a photo darkroom by sepia toning.  Threshold ranges from 0 to
1285f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // QuantumRange and is a measure of the extent of the sepia toning.
1286f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // A threshold of 80% is a good starting point for a reasonable tone.
1287f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    void sepiaTone(const double threshold_);
1288f1775d8f60a3ce551a096140d7559d46ba33ac14dirk
1289181b2a74351daea0388a98b8e37e13efc53d42c9dirk    // Sets meanErrorPerPixel, normalizedMaxError, and normalizedMeanError
1290181b2a74351daea0388a98b8e37e13efc53d42c9dirk    // in the current image. False is returned if the images are not identical.
1291181b2a74351daea0388a98b8e37e13efc53d42c9dirk    bool setColorMetric(const Image &reference_);
1292181b2a74351daea0388a98b8e37e13efc53d42c9dirk
1293f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // Allocates a pixel cache region to store image pixels as defined
1294f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // by the region rectangle.  This area is subsequently transferred
1295f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // from the pixel cache to the image via syncPixels.
1296f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    Quantum *setPixels(const ::ssize_t x_, const ::ssize_t y_,
1297f1775d8f60a3ce551a096140d7559d46ba33ac14dirk      const size_t columns_,const size_t rows_);
1298f1775d8f60a3ce551a096140d7559d46ba33ac14dirk
12993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Shade image using distant light source
130095f389652b69ee5487f18e744b7f54dcda1c733cdirk    void shade(const double azimuth_=30,const double elevation_=30,
130195f389652b69ee5487f18e744b7f54dcda1c733cdirk      const bool colorShading_=false);
130295f389652b69ee5487f18e744b7f54dcda1c733cdirk
1303171a5b35472b42f8dd5d8ce387506cc9f5022e62cristy    // Simulate an image shadow
130495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void shadow(const double percentAlpha_=80.0,const double sigma_=0.5,
130595f389652b69ee5487f18e744b7f54dcda1c733cdirk      const ssize_t x_=5,const ssize_t y_=5);
13066fee7fb9d4f334471f72a84f03df5f8172272794cristy
13073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Sharpen pixels in image
13083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // The radius_ parameter specifies the radius of the Gaussian, in
13093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // pixels, not counting the center pixel.  The sigma_ parameter
13103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // specifies the standard deviation of the Laplacian, in pixels.
131195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void sharpen(const double radius_=0.0,const double sigma_=1.0);
131295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void sharpenChannel(const ChannelType channel_,const double radius_=0.0,
131395f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double sigma_=1.0);
13143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
13153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Shave pixels from image edges.
131695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void shave(const Geometry &geometry_);
131795f389652b69ee5487f18e744b7f54dcda1c733cdirk
13183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Shear image (create parallelogram by sliding image by X or Y axis)
131995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void shear(const double xShearAngle_,const double yShearAngle_);
132095f389652b69ee5487f18e744b7f54dcda1c733cdirk
13213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // adjust the image contrast with a non-linear sigmoidal contrast algorithm
1322f5801049887b9f9666f8c6a1fbca9a140a99407ddirk    void sigmoidalContrast(const bool sharpen_,const double contrast,
132395f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double midpoint=QuantumRange/2.0);
132495f389652b69ee5487f18e744b7f54dcda1c733cdirk
132595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Image signature. Set force_ to true in order to re-calculate
132695f389652b69ee5487f18e744b7f54dcda1c733cdirk    // the signature regardless of whether the image data has been
132795f389652b69ee5487f18e744b7f54dcda1c733cdirk    // modified.
132895f389652b69ee5487f18e744b7f54dcda1c733cdirk    std::string signature(const bool force_=false) const;
13293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
1330f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // Simulates a pencil sketch. We convolve the image with a Gaussian
1331f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // operator of the given radius and standard deviation (sigma). For
1332f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // reasonable results, radius should be larger than sigma. Use a
1333f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // radius of 0 and SketchImage() selects a suitable radius for you.
1334f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    void sketch(const double radius_=0.0,const double sigma_=1.0,
1335f1775d8f60a3ce551a096140d7559d46ba33ac14dirk      const double angle_=0.0);
1336f1775d8f60a3ce551a096140d7559d46ba33ac14dirk
13373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Solarize image (similar to effect seen when exposing a
13383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // photographic film to light during the development process)
133995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void solarize(const double factor_=50.0);
134095f389652b69ee5487f18e744b7f54dcda1c733cdirk
13411940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Sparse color image, given a set of coordinates, interpolates the colors
13421940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // found at those coordinates, across the whole image, using various
13431940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // methods.
13441940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void sparseColor(const ChannelType channel_,
13451940fe06f035ea32a4ec4df61f6897396877aa3cdirk      const SparseColorMethod method_,const size_t numberArguments_,
13461940fe06f035ea32a4ec4df61f6897396877aa3cdirk      const double *arguments_);
13471940fe06f035ea32a4ec4df61f6897396877aa3cdirk
13488198a75baed6048bb2f5a2c04c773cce5e512c34cristy    // Splice the background color into the image.
134995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void splice(const Geometry &geometry_);
13503b8649e1b0d73b281f3f4d3a005cc3c91960e1bcdirk    void splice(const Geometry &geometry_,const Color &backgroundColor_);
13513b8649e1b0d73b281f3f4d3a005cc3c91960e1bcdirk    void splice(const Geometry &geometry_,const Color &backgroundColor_,
13523b8649e1b0d73b281f3f4d3a005cc3c91960e1bcdirk      const GravityType gravity_);
13538198a75baed6048bb2f5a2c04c773cce5e512c34cristy
13543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Spread pixels randomly within image by specified ammount
1355e11edabb5aa4d5be0301f8d652b33ef20889e76ddirk    void spread(const double amount_=3.0);
135695f389652b69ee5487f18e744b7f54dcda1c733cdirk
1357e316d154e7b050fab78dbf86b33f0797594939cadirk    // Returns the statistics for this image.
1358100c62ceee252ed475fca6a57b3dbaa3d27d2ed9dirk    Magick::ImageStatistics statistics() const;
13593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
13603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Add a digital watermark to the image (based on second image)
136195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void stegano(const Image &watermark_);
136295f389652b69ee5487f18e744b7f54dcda1c733cdirk
13633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Create an image which appears in stereo when viewed with
13643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // red-blue glasses (Red image on left, blue on right)
136595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void stereo(const Image &rightImage_);
136695f389652b69ee5487f18e744b7f54dcda1c733cdirk
13679f89a3fdb53e6226e8361b6d7b422f0387aa9431cristy    // Strip strips an image of all profiles and comments.
136895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void strip(void);
13699f89a3fdb53e6226e8361b6d7b422f0387aa9431cristy
1370c20fa63e4b57d62d33db77a5adc746ede902e5eddirk    // Search for the specified image at EVERY possible location in this image.
1371c20fa63e4b57d62d33db77a5adc746ede902e5eddirk    // This is slow! very very slow.. It returns a similarity image such that
1372c20fa63e4b57d62d33db77a5adc746ede902e5eddirk    // an exact match location is completely white and if none of the pixels
1373c20fa63e4b57d62d33db77a5adc746ede902e5eddirk    // match, black, otherwise some gray level in-between.
1374c20fa63e4b57d62d33db77a5adc746ede902e5eddirk    Image subImageSearch(const Image &reference_,const MetricType metric_,
1375c20fa63e4b57d62d33db77a5adc746ede902e5eddirk      Geometry *offset_,double *similarityMetric_,
1376c20fa63e4b57d62d33db77a5adc746ede902e5eddirk      const double similarityThreshold=(-1.0));
1377c20fa63e4b57d62d33db77a5adc746ede902e5eddirk
13783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Swirl image (image pixels are rotated by degrees)
137995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void swirl(const double degrees_);
138095f389652b69ee5487f18e744b7f54dcda1c733cdirk
13811940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Transfers the image cache pixels to the image.
13821940fe06f035ea32a4ec4df61f6897396877aa3cdirk    void syncPixels(void);
13831940fe06f035ea32a4ec4df61f6897396877aa3cdirk
13843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Channel a texture on image background
138595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void texture(const Image &texture_);
138695f389652b69ee5487f18e744b7f54dcda1c733cdirk
13873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Threshold image
138895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void threshold(const double threshold_);
138995f389652b69ee5487f18e744b7f54dcda1c733cdirk
1390bd85b6da2c4e91fa1136faa0c88510fb4378a8c4cristy    // Resize image to thumbnail size
1391bd85b6da2c4e91fa1136faa0c88510fb4378a8c4cristy    void thumbnail(const Geometry &geometry_);
1392bd85b6da2c4e91fa1136faa0c88510fb4378a8c4cristy
1393f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // Applies a color vector to each pixel in the image. The length of the
1394f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // vector is 0 for black and white and at its maximum for the midtones.
1395f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // The vector weighting function is f(x)=(1-(4.0*((x-0.5)*(x-0.5))))
1396f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    void tint(const std::string opacity_);
1397f1775d8f60a3ce551a096140d7559d46ba33ac14dirk
139895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Origin of coordinate system to use when annotating with text or drawing
139995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void transformOrigin(const double x_,const double y_);
140095f389652b69ee5487f18e744b7f54dcda1c733cdirk
140195f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Reset transformation parameters to default
140295f389652b69ee5487f18e744b7f54dcda1c733cdirk    void transformReset(void);
140395f389652b69ee5487f18e744b7f54dcda1c733cdirk
140495f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Scale to use when annotating with text or drawing
140595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void transformScale(const double sx_,const double sy_);
14063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
14073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Add matte image to image, setting pixels matching color to
14083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // transparent
14092fcdcaf5f27967318e07808b67498cceac3b4125dirk    void transparent(const Color &color_,const bool inverse_=false);
141095f389652b69ee5487f18e744b7f54dcda1c733cdirk
14113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Add matte image to image, for all the pixels that lies in between
14123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // the given two color
141395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void transparentChroma(const Color &colorLow_,const Color &colorHigh_);
14143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
1415982785cc04fa211e60b4c1ee8f28996c23c06e80dirk    // Creates a horizontal mirror image by reflecting the pixels around the
1416982785cc04fa211e60b4c1ee8f28996c23c06e80dirk    // central y-axis while rotating them by 90 degrees.
1417982785cc04fa211e60b4c1ee8f28996c23c06e80dirk    void transpose(void);
1418982785cc04fa211e60b4c1ee8f28996c23c06e80dirk
1419982785cc04fa211e60b4c1ee8f28996c23c06e80dirk    // Creates a vertical mirror image by reflecting the pixels around the
1420982785cc04fa211e60b4c1ee8f28996c23c06e80dirk    // central x-axis while rotating them by 270 degrees.
1421982785cc04fa211e60b4c1ee8f28996c23c06e80dirk    void transverse(void);
1422982785cc04fa211e60b4c1ee8f28996c23c06e80dirk
14233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Trim edges that are the background color from the image
142495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void trim(void);
14253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
1426f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // Returns the unique colors of an image.
1427100c62ceee252ed475fca6a57b3dbaa3d27d2ed9dirk    Image uniqueColors(void) const;
1428f1775d8f60a3ce551a096140d7559d46ba33ac14dirk
14293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Replace image with a sharpened version of the original image
14303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // using the unsharp mask algorithm.
14313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  radius_
14323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //    the radius of the Gaussian, in pixels, not counting the
14333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //    center pixel.
14343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //  sigma_
14353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //    the standard deviation of the Gaussian, in pixels.
14363afd4014cd833bc3c170cb54e37c925ceacd17decristy    //  amount_
14373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //    the percentage of the difference between the original and
14383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //    the blur image that is added back into the original.
14393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // threshold_
14403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //   the threshold in pixels needed to apply the diffence amount.
144195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void unsharpmask(const double radius_,const double sigma_,
144295f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double amount_,const double threshold_);
144395f389652b69ee5487f18e744b7f54dcda1c733cdirk    void unsharpmaskChannel(const ChannelType channel_,const double radius_,
144495f389652b69ee5487f18e744b7f54dcda1c733cdirk      const double sigma_,const double amount_,const double threshold_);
14453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
1446f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    // Softens the edges of the image in vignette style.
1447f1775d8f60a3ce551a096140d7559d46ba33ac14dirk    void vignette(const double radius_=0.0,const double sigma_=1.0,
1448f1775d8f60a3ce551a096140d7559d46ba33ac14dirk      const ssize_t x_=0,const ssize_t y_=0);
1449f1775d8f60a3ce551a096140d7559d46ba33ac14dirk
14503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Map image pixels to a sine wave
145195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void wave(const double amplitude_=25.0,const double wavelength_=150.0);
1452092a8ea1959d818804462ea79231863dc2e3fd26dirk
14535afc3a6a4c6cc8a2226bbd96ea60c80d975b56ccdirk    // Removes noise from the image using a wavelet transform.
1454906c77aa619f7206e279cc957e20c0aef5350a9bdirk    void waveletDenoise(const double threshold_,const double softness_);
14555afc3a6a4c6cc8a2226bbd96ea60c80d975b56ccdirk
145650666310ad7ab8e07037cb72cdab27b07540e150dirk    // Forces all pixels above the threshold into white while leaving all
1457092a8ea1959d818804462ea79231863dc2e3fd26dirk    // pixels at or below the threshold unchanged.
145895f389652b69ee5487f18e744b7f54dcda1c733cdirk    void whiteThreshold(const std::string &threshold_);
145995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void whiteThresholdChannel(const ChannelType channel_,
146095f389652b69ee5487f18e744b7f54dcda1c733cdirk      const std::string &threshold_);
14613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
14623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Write single image frame to in-memory BLOB, with optional
14633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // format and adjoin parameters.
146495f389652b69ee5487f18e744b7f54dcda1c733cdirk    void write(Blob *blob_);
146595f389652b69ee5487f18e744b7f54dcda1c733cdirk    void write(Blob *blob_,const std::string &magick_);
146695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void write(Blob *blob_,const std::string &magick_,const size_t depth_);
14673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
14683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Write single image frame to an array of pixels with storage
14693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // type specified by user (DispatchImage), e.g.
14701940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // image.write( 0, 0, 640, 1, "RGB", 0, pixels );
147195f389652b69ee5487f18e744b7f54dcda1c733cdirk    void write(const ::ssize_t x_,const ::ssize_t y_,const size_t columns_,
147295f389652b69ee5487f18e744b7f54dcda1c733cdirk      const size_t rows_,const std::string &map_,const StorageType type_,
147395f389652b69ee5487f18e744b7f54dcda1c733cdirk      void *pixels_);
14743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
147595f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Write single image frame to a file
147695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void write(const std::string &imageSpec_);
1477af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk
1478af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    // Associate a mask with the image. The mask must be the same dimensions
1479af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    // as the image. Pass an invalid image to unset an existing mask.
1480af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    void writeMask(const Image &mask_);
1481af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    Image writeMask(void) const;
1482af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk
14833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Transfers one or more pixel components from the image pixel
14843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // cache to a buffer or file.
14853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Used to support image encoders.
148695f389652b69ee5487f18e744b7f54dcda1c733cdirk    void writePixels(const QuantumType quantum_,unsigned char *destination_);
14873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
148895f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Zoom image to specified size.
148995f389652b69ee5487f18e744b7f54dcda1c733cdirk    void zoom(const Geometry &geometry_);
149095f389652b69ee5487f18e744b7f54dcda1c733cdirk
149195f389652b69ee5487f18e744b7f54dcda1c733cdirk    //////////////////////////////////////////////////////////////////////
14923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //
14933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // No user-serviceable parts beyond this point
14943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //
14953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    //////////////////////////////////////////////////////////////////////
14963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
14973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Construct with MagickCore::Image and default options
149895f389652b69ee5487f18e744b7f54dcda1c733cdirk    Image(MagickCore::Image *image_);
14993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
15003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Retrieve Image*
150195f389652b69ee5487f18e744b7f54dcda1c733cdirk    MagickCore::Image *&image(void);
150295f389652b69ee5487f18e744b7f54dcda1c733cdirk    const MagickCore::Image *constImage(void) const;
15033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
15043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Retrieve ImageInfo*
150595f389652b69ee5487f18e744b7f54dcda1c733cdirk    MagickCore::ImageInfo *imageInfo(void);
150695f389652b69ee5487f18e744b7f54dcda1c733cdirk    const MagickCore::ImageInfo *constImageInfo(void) const;
15073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
15081940fe06f035ea32a4ec4df61f6897396877aa3cdirk    // Retrieve Options*
15091940fe06f035ea32a4ec4df61f6897396877aa3cdirk    Options *options(void);
15101940fe06f035ea32a4ec4df61f6897396877aa3cdirk    const Options *constOptions(void) const;
15111940fe06f035ea32a4ec4df61f6897396877aa3cdirk
15123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Retrieve QuantizeInfo*
151395f389652b69ee5487f18e744b7f54dcda1c733cdirk    MagickCore::QuantizeInfo *quantizeInfo(void);
151495f389652b69ee5487f18e744b7f54dcda1c733cdirk    const MagickCore::QuantizeInfo *constQuantizeInfo(void) const;
15153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
15163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy    // Prepare to update image (copy if reference > 1)
151795f389652b69ee5487f18e744b7f54dcda1c733cdirk    void modifyImage(void);
15183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
151995f389652b69ee5487f18e744b7f54dcda1c733cdirk    // Replace current image (reference counted)
152095f389652b69ee5487f18e744b7f54dcda1c733cdirk    MagickCore::Image *replaceImage(MagickCore::Image *replacement_);
152195f389652b69ee5487f18e744b7f54dcda1c733cdirk
15223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  private:
152395f389652b69ee5487f18e744b7f54dcda1c733cdirk
1524223843f66554713ee926b09f958ff6bfdb5acb61dirk    void floodFill(const ssize_t x_,const ssize_t y_,
1525223843f66554713ee926b09f958ff6bfdb5acb61dirk      const Magick::Image *fillPattern_,const Color &fill_,
1526223843f66554713ee926b09f958ff6bfdb5acb61dirk      const PixelInfo *target,const bool invert_);
1527223843f66554713ee926b09f958ff6bfdb5acb61dirk
1528af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    void mask(const Image &mask_,const PixelMask);
1529af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    Image mask(const PixelMask) const;
1530af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk
1531af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk    void read(MagickCore::Image *image,
1532af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk      MagickCore::ExceptionInfo *exceptionInfo);
1533af131f1a1e0ca45f26b05fa7c77c90985bca1a07dirk
153495f389652b69ee5487f18e744b7f54dcda1c733cdirk    ImageRef *_imgRef;
15353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy  };
15363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
15373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} // end of namespace Magick
15383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy
15393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#endif // Magick_Image_header
1540