\section{Magick++ STL Support}
\scriptsize{
\begin{verbatim}

Magick++ provides a set of Standard Template Libary (STL) algorithms for
operating across ranges of image frames in a container. It also provides a
set of STL unary function objects to apply an operation on image frames in a
container via an algorithm which uses unary function objects. A good example
of a standard algorithm which is useful for processing containers of image
frames is the STL for_each algorithm which invokes a unary function object
on a range of container elements.

Magick++ uses a limited set of template argument types. The current template
argument types are:

     Container

          A container having the properties of a Back Insertion
          Sequence. Sequences support forward iterators and Back
          Insertion Sequences support the additional abilty to
          append an element via push_back(). Common compatable
          container types are the STL <vector> and <list> template
          containers. This template argument is usually used to
          represent an output container in which one or more image
          frames may be appended. Containers like STL <vector>
          which have a given default capacity may need to have
          their capacity adjusted via reserve() to a larger
          capacity in order to support the expected final size .
          Since Magick++ images are very small, it is likely that
          the default capacity of STL <vector> is sufficient for
          most situations.

     InputIterator

          An input iterator used to express a position in a
          container. These template arguments are typically used
          to represent a range of elements with first_
          representing the first element to be processed and last_
          representing the element to stop at. When processing the
          entire contents of a container, it is handy to know that
          STL containers usually provide the begin() and end()
          methods to return input interators which correspond with
          the first and last elements, respectively.

The following is an example of how frames from a GIF animation
"test_image_anim.gif" may be appended horizontally with the resulting image
written to the file "appended_image.miff":

#include <list>
#include <Magick++.h>
using namespace std;
using namespace Magick;

int main(int /*argc*/,char **/*argv*/)
{
   list<Image> imageList;
   readImages( &imageList, "test_image_anim.gif" );

   Image appended;
   appendImages( &appended, imageList.begin(), imageList.end() );
   appended.write( "appended_image.miff" );
   return 0;
}

The available Magick++ specific STL algorithms for operating on sequences of
image frames are shown in the following table:

                 Magick++ STL Algorithms For Image Sequences

 Algorithm         Signature                Description

                                            Animate a sequence of image
                                            frames. Image frames are
                                            displayed in succession,
 animateImages     InputIterator first_,    creating an animated effect.
                   InputIterator last_      The animation options are taken
                                            from the first image frame.
                                            This feature is only supported
                                            under X11 at the moment.

                                            Append a sequence of image
                                            frames, writing the result to
                                            appendedImage_. All the input
                                            image frames must have the same
                   Image *appendedImage_,   width or height. Image frames
                                            of the same width are stacked
 appendImages      InputIterator first_,    top-to-bottom. Image frames of
                   InputIterator last_,
                   bool stack_ = false      the same height are stacked
                                            left-to-right. If the stack_
                                            parameter is false, rectangular
                                            image frames are stacked
                                            left-to-right otherwise
                                            top-to-bottom.

                                            Average a sequence of image
                   Image *averagedImage_,   frames, writing the result to
 averageImages     InputIterator first_,    averagedImage_. All the input
                   InputIterator last_      image frames must be the same
                                            size in pixels.

                                            Merge a sequence of images.
                                            This is useful for GIF
 coalesceImages    InputIterator first_,    animation sequences that have
                   InputIterator last_      page offsets and disposal
                                            methods. The input images are
                                            modified in-place.

                                            Break down an image sequence
                                            into constituent parts.  This
                   Container                is useful for creating GIF or
                                            MNG animation sequences. The
 deconstructImages *deconstructedImages_,   input sequence is specified by
                   InputIterator first_,
                   InputIterator last_      first_ and last_, and the
                                            deconstruted images are
                                            returned via
                                            deconstructedImages_.

                                            Display a sequence of image
                                            frames. Through use of a pop-up
                                            menu, image frames may be
                                            selected in succession. This
                                            feature is fully supported
                                            under X11 but may have only
                                            limited support in other
 displayImages     InputIterator first_,    environments.
                   InputIterator last_
                                            Caution: if an image format is
                                            is not compatable with the
                                            display visual (e.g. JPEG on a
                                            colormapped display) then the
                                            original image will be altered.
                                            Use a copy of the original if
                                            this is a problem.

                                            Merge a sequence of image
                                            frames which represent image
                                            layers into a single composited
                   Image *flattendImage_,   representation. The
 flattenImages     InputIterator first_,    flattendImage_ parameter points
                   InputIterator last_      to an existing Image to update
                                            with the flattened image. This
                                            function is useful for
                                            combining Photoshop layers into
                                            a single image.

                                            Replace the colors of a
                   InputIterator first_,    sequence of images with the
                   InputIterator last_,     closest color from a reference
 mapImages         const Image& mapImage_,  image. Set dither_ to true to
                   bool dither_,  bool      enable dithering.  Set
                   measureError_ = false    measureError_ to true in order
                                            to evaluate quantization error.

                                            Create a composite image by
                                            combining several separate
                                            image frames. Multiple frames
                                            may be generated in the output
                   Container                container montageImages_
                   *montageImages_,         depending on the tile setting
                                            and the number of image frames
 montageImages     InputIterator first_,    montaged. Montage options are
                   InputIterator last_,
                   const Montage            provided via the parameter
                   &montageOpts_            montageOpts_. Options set in
                                            the first image frame
                                            (backgroundColor,borderColor,
                                            matteColor, penColor,font, and
                                            fontPointsize) are also used as
                                            options by montageImages().

                                            Morph a seqence of image
                                            frames. This algorithm  expands
                   Container                the number of image frames
                   *morphedImages_,         (output to the container
 morphImages       InputIterator first_,    morphedImages_) by adding the
                   InputIterator last_,     number of intervening frames
                   unsigned int frames_     specified by frames_ such that
                                            the original frames morph
                                            (blend) into each other when
                                            played as an animation.

                                            Inlay a number of images to
                                            form a single coherent picture.
                   Image *mosaicImage_,     The mosicImage_ argument is
 mosaicImages      InputIterator first_,    updated with a mosaic
                   InputIterator last_      constructed from the image
                                            sequence represented by first_
                                            through last_.

                                            Read a sequence of image frames
                   Container *sequence_,    into existing container
 readImages        const std::string        (appending to container
                   &imageSpec_              sequence_) with image names
                                            specified in the string
                                            imageSpec_.

                                            Read a sequence of image frames
                   Container *sequence_,    into existing container
                   const Blob &blob_        (appending to container
                                            sequence_) from Blob blob_.

                                            Write images in container to
                                            file specified by string
                                            imageSpec_. Set adjoin_ to
                                            false to write a set of image
                                            frames via a wildcard
                                            imageSpec_ (e.g.
                   InputIterator first_,    image%02d.miff).
                   InputIterator last_,     The wildcard must be one of
 writeImages       const std::string        %0Nd, %0No, or %0Nx.
                   &imageSpec_, bool        Caution: if an image format is
                   adjoin_ = true           selected which is capable of
                                            supporting fewer colors than
                                            the original image or
                                            quantization has been
                                            requested, the original image
                                            will be quantized to fewer
                                            colors. Use a copy of the
                                            original if this is a problem.

                                            Write images in container to
                                            in-memory BLOB specified by
                                            Blob blob_. Set adjoin_ to
                                            false to write a set of image
                                            frames via a wildcard
                                            imageSpec_ (e.g.
                   InputIterator first_,    image%02d.miff).
                   InputIterator last_,     Caution: if an image format is
                   Blob *blob_, bool        selected which is capable of
                   adjoin_ = true           supporting fewer colors than
                                            the original image or
                                            quantization has been
                                            requested, the original image
                                            will be quantized to fewer
                                            colors. Use a copy of the
                                            original if this is a problem.


                   InputIterator first_,    Quantize colors in images using
                                            current quantization settings.
 quantizeImages    InputIterator last_,     Set measureError_ to true in
                   bool measureError_ =
                   false                    order to measure quantization
                                            error.




Magick++ Unary Function Objects

Magick++ unary function objects inherit from the STL unary_function template
class . The STL unary_function template class is of the form

     unary_function<Arg, Result>

and expects that derived classes implement a method of the form:

     Result operator()( Arg argument_ );

which is invoked by algorithms using the function object. In the case of
unary function objects defined by Magick++, the invoked function looks like:

     void operator()( Image &image_);

with a typical implementation looking similar to:

     void operator()( Image &image_ )
       {
         image_.contrast( _sharpen );
       }

where contrast is an Image method and _sharpen is an argument stored within
the function object by its contructor. Since constructors may be
polymorphic, a given function object may have several constructors and
selects the appropriate Image method based on the arguments supplied.

In essence, unary function objects (as provided by Magick++) simply provide
the means to construct an object which caches arguments for later use by an
algorithm designed for use with unary function objects. There is a unary
function object corresponding each algorithm provided by the Image class and
there is a contructor available compatable with each synonymous method in
the Image class.

The unary function objects that Magick++ provides to support manipulating
images are shown in the following table:

           Magick++ Unary Function Objects For Image Manipulation

  Function Object    Constructor Signatures(s)          Description


 addNoiseImage     NoiseType noiseType_         Add noise to image with
                                                specified noise type.

                                                Annotate with text using
                                                specified text, bounding
                                                area, placement gravity,
 annotateImage     const std::string &text_,    and rotation. If
                   const Geometry &location_
                                                boundingArea_ is invalid,
                                                then bounding area is
                                                entire image.

                                                Annotate using specified
                   std::string text_, const     text, bounding area, and
                   Geometry &boundingArea_,     placement gravity. If
                   GravityType gravity_         boundingArea_ is invalid,
                                                then bounding area is
                                                entire image.

                                                Annotate with text using
                   const std::string &text_,    specified text, bounding
                                                area, placement gravity,
                   const Geometry               and rotation. If
                   &boundingArea_, GravityType
                   gravity_, double degrees_,   boundingArea_ is invalid,
                                                then bounding area is
                                                entire image.

                                                Annotate with text
                   const std::string &text_,    (bounding area is entire
                   GravityType gravity_         image) and placement
                                                gravity.

                                                Blur image. The radius_
                                                parameter specifies the
                                                radius of the Gaussian, in
 blurImage         const double radius_ = 1,    pixels, not counting the
                   const double sigma_ = 0.5    center pixel.  The sigma_
                                                parameter specifies the
                                                standard deviation of the
                                                Laplacian, in pixels.

                                                Border image (add border to
 borderImage       const Geometry &geometry_ =  image).  The color of the
                   "6x6+0+0"                    border is specified by the
                                                borderColor attribute.

                                                Charcoal effect image
                                                (looks like charcoal
                                                sketch). The radius_
                                                parameter specifies the
 charcoalImage     const double radius_ = 1,    radius of the Gaussian, in
                   const double sigma_ = 0.5    pixels, not counting the
                                                center pixel.  The sigma_
                                                parameter specifies the
                                                standard deviation of the
                                                Laplacian, in pixels.

                                                Chop image (remove vertical
 chopImage         const Geometry &geometry_    or horizontal subregion of
                                                image)

                   const unsigned int
                   opacityRed_, const unsigned  Colorize image with pen
 colorizeImage     int opacityGreen_, const     color, using specified
                   unsigned int opacityBlue_,   percent opacity for red,
                   const Color &penColor_       green, and blue quantums.

                                                Colorize image with pen
                   const unsigned int opacity_, color, using specified
                   const Color &penColor_
                                                percent opacity.

                                                Comment image (add comment
                                                string to image).  By
                                                default, each image is
                                                commented with its file
                                                name. Use  this  method to
 commentImage      const std::string &comment_  assign a specific comment
                                                to the image.  Optionally
                                                you can include the image
                                                filename, type, width,
                                                height, or other  image
                                                attributes by embedding
                                                special format characters.

                   const Image
                   &compositeImage_, int        Compose an image onto
 compositeImage    xOffset_, int yOffset_,      another at specified offset
                   CompositeOperator compose_ = and using specified
                   InCompositeOp                algorithm

                   const Image
                   &compositeImage_, const
                   Geometry &offset_,
                   CompositeOperator compose_ =
                   InCompositeOp

                                                Condense image
 condenseImage     void                         (Re-run-length encode image
                                                in memory).

                                                Contrast image (enhance
 contrastImage     unsigned int sharpen_        intensity differences in
                                                image)


 cropImage         const Geometry &geometry_    Crop image (subregion of
                                                original image)

 cycleColormap-
 Image             int amount_                  Cycle image colormap


 despeckleImage    void                         Despeckle image (reduce
                                                speckle noise)


 drawImage         const Drawable &drawable_    Draw shape or text on
                                                image.

                                                Draw shapes or text on
                                                image using a set of
                                                Drawable objects contained
                                                in an STL list. Use of this
                   const std::list<Drawable>    method improves drawing
                   &drawable_
                                                performance and allows
                                                batching draw objects
                                                together in a list for
                                                repeated use.

                                                Edge image (hilight edges
                                                in image).  The radius is
 edgeImage         unsigned int radius_ = 0.0   the radius of the pixel
                                                neighborhood.. Specify a
                                                radius of zero for
                                                automatic radius selection.

                                                Emboss image (hilight edges
                                                with 3D effect). The
                                                radius_ parameter specifies
                                                the radius of the Gaussian,
 embossImage       const double radius_ = 1,    in pixels, not counting the
                   const double sigma_ = 0.5
                                                center pixel.  The sigma_
                                                parameter specifies the
                                                standard deviation of the
                                                Laplacian, in pixels.


 enhanceImage      void                         Enhance image (minimize
                                                noise)


 equalizeImage     void                         Equalize image (histogram
                                                equalization)

                                                Flip image (reflect each
 flipImage         void                         scanline in the vertical
                                                direction)

                                                Flood-fill color across
                                                pixels that match the color
 floodFill-        unsigned int x_, unsigned    of the target pixel and are
 ColorImage        int y_, const Color          neighbors of the target
                   &fillColor_                  pixel. Uses current fuzz
                                                setting when determining
                                                color match.


                   const Geometry &point_,
                   const Color &fillColor_

                                                Flood-fill color across
                                                pixels starting at
                   unsigned int x_, unsigned    target-pixel and stopping
                   int y_, const Color          at pixels matching
                   &fillColor_, const Color     specified border color.
                   &borderColor_                Uses current fuzz setting
                                                when determining color
                                                match.

                   const Geometry &point_,
                   const Color &fillColor_,
                   const Color &borderColor_

                                                Flood-fill texture across
                                                pixels that match the color
 floodFill-        unsigned int x_, unsigned    of the target pixel and are
 TextureImage      int y_,  const Image         neighbors of the target
                   &texture_                    pixel. Uses current fuzz
                                                setting when determining
                                                color match.


                   const Geometry &point_,
                   const Image &texture_

                                                Flood-fill texture across
                                                pixels starting at
                   unsigned int x_, unsigned    target-pixel and stopping
                   int y_, const Image          at pixels matching
                   &texture_, const Color       specified border color.
                   &borderColor_                Uses current fuzz setting
                                                when determining color
                                                match.

                   const Geometry &point_,
                   const Image &texture_, const
                   Color &borderColor_

                                                Flop image (reflect each
 flopImage         void                         scanline in the horizontal
                                                direction)


 frameImage        const Geometry &geometry_ =  Add decorative frame around
                   "25x25+6+6"                  image

                   unsigned int width_,
                   unsigned int height_, int
                   x_, int y_, int innerBevel_
                   = 0, int outerBevel_ = 0

                                                Gamma correct image
 gammaImage        double gamma_                (uniform red, green, and
                                                blue correction).

                   double gammaRed_, double
                   gammaGreen_, double          Gamma correct red, green,
                   gammaBlue_                   and blue channels of image.

                                                Gaussian blur image. The
                                                number of neighbor pixels
                                                to be included in the
                                                convolution mask is
                                                specified by 'width_'.  For
 gaussianBlurImage double width_, double sigma_ example, a width of one
                                                gives a (standard) 3x3
                                                convolution mask. The
                                                standard deviation of the
                                                Gaussian bell curve is
                                                specified by 'sigma_'.


 implodeImage      double factor_               Implode image (special
                                                effect)

                                                Assign a label to an image.
                                                Use this option to  assign
                                                a  specific label to the
                                                image. Optionally you can
                                                include the image filename,
                                                type, width, height, or
                                                scene number in the label
                                                by embedding  special
 labelImage        const string &label_         format characters. If the
                                                first character of string
                                                is @, the image label is
                                                read from a file titled by
                                                the remaining characters in
                                                the string. When converting
                                                to Postscript, use this
                                                option to specify a header
                                                string to print above the
                                                image.

                                                Extract layer from image.
                                                Use this option to extract
                                                a particular layer from
 layerImage        LayerType layer_             the image.  MatteLayer,
                                                for  example, is useful for
                                                extracting the opacity
                                                values from an image.


 magnifyImage      void                         Magnify image by integral
                                                size

                                                Remap image colors with
                                                closest color from
                                                reference image. Set
                                                dither_ to true in to apply
                                                Floyd/Steinberg error
                                                diffusion to the image. By
 mapImage          const Image &mapImage_ ,     default, color reduction
                   bool dither_ = false         chooses an optimal  set  of
                                                colors that best represent
                                                the original image.
                                                Alternatively, you can
                                                choose  a  particular  set
                                                of colors  from  an image
                                                file with this option.


 matteFloodfill-   const Color &target_,        Floodfill designated area
 Image             unsigned int matte_, int x_, with a matte value
                   int y_, PaintMethod method_

                                                Filter image by replacing
 medianFilterImage const double radius_ = 0.0   each pixel component with
                                                the median color in a
                                                circular neighborhood


 minifyImage       void                         Reduce image by integral
                                                size

                                                Modulate percent hue,
 modulateImage     double brightness_, double   saturation, and brightness
                   saturation_, double hue_
                                                of an image

                                                Negate colors in image.
                                                Replace every pixel with
                                                its complementary color
 negateImage       bool grayscale_ = false      (white becomes black,
                                                yellow becomes blue,
                                                etc.).  Set grayscale to
                                                only negate grayscale
                                                values in image.

                                                Normalize image (increase
                                                contrast by normalizing the
 normalizeImage    void                         pixel values to span the
                                                full range of color
                                                values).


 oilPaintImage     unsigned int radius_ = 3     Oilpaint image (image looks
                                                like oil painting)

                                                Set or attenuate the
                                                opacity channel in the
                                                image. If the image pixels
                                                are opaque then they are
                                                set to the specified
                                                opacity value, otherwise
                                                they are blended with the
                                                supplied opacity value.
 opacityImage      unsigned int opacity_        The value of opacity_
                                                ranges from 0 (completely
                                                opaque) to MaxRGB. The
                                                defines OpaqueOpacity and
                                                TransparentOpacity are
                                                available to specify
                                                completely opaque or
                                                completely transparent,
                                                respectively.

                                                Change color of pixels
 opaqueImage       const Color &opaqueColor_,   matching opaqueColor_ to
                   const Color &penColor_
                                                specified penColor_.

                                                Quantize image (reduce
                                                number of colors). Set
 quantizeImage     bool measureError_ = false   measureError_ to true in
                                                order to calculate error
                                                attributes.


                   const Geometry &geometry_ =  Raise image (lighten or
 raiseImage        "6x6+0+0",  bool raisedFlag_ darken the edges of an
                   =  false                     image to give a 3-D raised
                                                or lowered effect)


 reduceNoise-                                   Reduce noise in image using
 Image             void                         a noise peak elimination
                                                filter.

                   unsigned int order_

                                                Roll image (rolls image
                                                vertically and
 rollImage         int columns_, int rows_      horizontally) by specified
                                                number of columnms and
                                                rows)

                                                Rotate image
 rotateImage       double degrees_              counter-clockwise by
                                                specified number of degrees


 sampleImage       const Geometry &geometry_    Resize image by using pixel
                                                sampling algorithm


 scaleImage        const Geometry &geometry_    Resize image by using
                                                simple ratio algorithm

                                                Segment (coalesce similar
                                                image components) by
                                                analyzing the histograms of
                                                the color components and
                                                identifying units that are
                                                homogeneous with the fuzzy
                                                c-means technique. Also
                                                uses quantizeColorSpace and
                                                verbose image attributes.
                   double clusterThreshold_ =   Specify clusterThreshold_,
 segmentImage      1.0,                         as the number  of  pixels
                   double smoothingThreshold_ = each cluster  must exceed
                   1.5                          the cluster threshold to be
                                                considered valid.
                                                SmoothingThreshold_
                                                eliminates noise in the
                                                second derivative of the
                                                histogram. As the value is
                                                increased, you can  expect
                                                a  smoother second
                                                derivative.  The default is
                                                1.5.

                                                Shade image using distant
                                                light source. Specify
                                                azimuth_ and elevation_ as
                                                the  position  of  the
                   double azimuth_ = 30, double light source. By default,
 shadeImage        elevation_ = 30,             the shading results as a
                   bool colorShading_ = false   grayscale image.. Set
                                                colorShading_ to true to
                                                shade the red, green, and
                                                blue components of the
                                                image.

                                                Sharpen pixels in image.
                                                The radius_ parameter
                                                specifies the radius of the
                                                Gaussian, in pixels, not
 sharpenImage      const double radius_ = 1,    counting the center pixel.
                   const double sigma_ = 0.5
                                                The sigma_ parameter
                                                specifies the standard
                                                deviation of the Laplacian,
                                                in pixels.


 shaveImage        const Geometry &geometry_    Shave pixels from image
                                                edges.

                                                Shear image (create
                                                parallelogram by sliding
                                                image by X or Y axis).
                                                Shearing slides one edge of
                                                an image along the X  or  Y
                                                axis,  creating  a
                                                parallelogram.  An X
                                                direction shear slides an
                                                edge along the X axis,
                                                while  a  Y  direction
                                                shear  slides  an edge
                                                along the Y axis.  The
 shearImage        double xShearAngle_, double  amount of the shear is
                   yShearAngle_                 controlled by a shear
                                                angle.  For X direction
                                                shears,  x  degrees is
                                                measured relative to the Y
                                                axis, and similarly, for Y
                                                direction shears  y
                                                degrees is measured
                                                relative to the X axis.
                                                Empty triangles left over
                                                from shearing the  image
                                                are filled  with  the
                                                color  defined as
                                                borderColor.

                                                Solarize image (similar to
                                                effect seen when exposing a
 solarizeImage     double factor_               photographic film to light
                                                during the development
                                                process)

                                                Spread pixels randomly
 spreadImage       unsigned int amount_ = 3     within image by specified
                                                amount

                                                Add a digital watermark to
 steganoImage      const Image &watermark_      the image (based on second
                                                image)

                                                Create an image which
                                                appears in stereo when
 stereoImage       const Image &rightImage_     viewed with red-blue
                                                glasses (Red image on left,
                                                blue on right)


 swirlImage        double degrees_              Swirl image (image pixels
                                                are rotated by degrees)


 textureImage      const Image &texture_        Layer a texture on image
                                                background

 thresholdImage    double threshold_            Threshold image

                                                Transform image based on
 transformImage    const Geometry               image and crop geometries.
                   &imageGeometry_
                                                Crop geometry is optional.

                   const Geometry
                   &imageGeometry_, const
                   Geometry &cropGeometry_

                                                Add matte image to image,
 transparentImage  const Color &color_          setting pixels matching
                                                color to transparent.

                                                Trim edges that are the
 trimImage         void                         background color from the
                                                image.


 waveImage         double amplitude_ = 25.0,    Alter an image along a sine
                   double wavelength_ = 150.0   wave.


 zoomImage         const Geometry &geometry_    Zoom image to specified
                                                size.


Function objects are available to set attributes on image frames which are
equivalent to methods in the Image object. These function objects allow
setting an option across a range of image frames using for_each().

The following code is an example of how the color 'red' may be set to
transparent in a GIF animation:

list<image> images;
readImages( &images, "animation.gif" );
for_each ( images.begin(), images.end(), transparentImage( "red" )  );
writeImages( images.begin(), images.end(), "animation.gif" );

The available function objects for setting image attributes are

                           Image Image Attributes

 Attribute         Type              Constructor       Description
                                     Signature(s)

                                                       Join images into a
 adjoinImage       bool              bool flag_        single multi-image
                                                       file.

                                                       Control antialiasing
                                                       of rendered
 antiAliasImage    bool              bool flag_        Postscript and
                                                       Postscript or
                                                       TrueType fonts.
                                                       Enabled by default.

                                                       Time in 1/100ths of
                                                       a second (0 to
                                                       65535) which must
                                                       expire before
                                                       displaying the next
 animation-        unsigned int (0   unsigned int      image in an animated
 DelayImage        to 65535)         delay_            sequence. This
                                                       option is useful for
                                                       regulating the
                                                       animation of a
                                                       sequence  of GIF
                                                       images within
                                                       Netscape.

                                                       Number of iterations
 animation-                          unsigned int      to loop an animation
 IterationsImage   unsigned int      iterations_       (e.g. Netscape loop
                                                       extension) for.

 background-                         const Color       Image background
 ColorImage        Color             &color_           color

 background-                         const string      Image to use as
 TextureImage      std::string       &texture_         background texture.

 borderColor-                         const Color
 Image             Color             &color_           Image border color

                                                       Base color that
 boxColorImage     Color             const Color       annotation text is
                                     &boxColor_
                                                       rendered on.


 chroma-                             float x_, float   Chromaticity blue
 BluePrimaryImage  float x & y       y_                primary point (e.g.
                                                       x=0.15, y=0.06)


 chroma-                             float x_, float   Chromaticity green
 GreenPrimaryImage float x & y       y_                primary point (e.g.
                                                       x=0.3, y=0.6)


 chroma-                             float x_, float   Chromaticity red
 RedPrimaryImage   float x & y       y_                primary point (e.g.
                                                       x=0.64, y=0.33)


 chroma-                             float x_, float   Chromaticity white
 WhitePointImage   float x & y       y_                point (e.g.
                                                       x=0.3127, y=0.329)

                                                       Colors within this
                                                       distance are
                                                       considered equal. A
                                                       number of algorithms
                                                       search for a target
 colorFuzzImage    double            double fuzz_      color. By default
                                                       the color must be
                                                       exact. Use this
                                                       option to match
                                                       colors that are
                                                       close to the target
                                                       color in RGB space.

                                     unsigned int
 colorMapImage     Color             index_, const     Color at
                                     Color &color_     color-pallet index.

                                                       The colorspace (e.g.
                                                       CMYK) used to
                                                       represent the image
 colorSpaceImage   ColorspaceType    ColorspaceType    pixel colors. Image
                                     colorSpace_       pixels are always
                                                       stored as RGB(A)
                                                       except for the case
                                                       of CMY(K).

                                                       Image compresion
 compressType-                       CompressionType   type. The default is
 Image             CompressionType   compressType_     the compression type
                                                       of the specified
                                                       image file.

                                                       Vertical and
                                                       horizontal
                                                       resolution in pixels
                                                       of the image. This
                                                       option specifies an
 densityImage      Geometry          const Geometry    image density when
                   (default 72x72)   &density_
                                                       decoding a
                                                       Postscript or
                                                       Portable Document
                                                       page. Often used
                                                       with psPageSize.

                                                       Image depth. Used to
                                                       specify the bit
                                                       depth when reading
                                                       or writing  raw
                                                       images or thwn the
 depthImage        unsigned int (8   unsigned int      output format
                   or 16)            depth_
                                                       supports multiple
                                                       depths. Defaults to
                                                       the quantum depth
                                                       that ImageMagick is
                                                       compiled with.

                                                       Specify (or obtain)
 endianImage       EndianType        EndianType        endian option for
                                     endian_           formats which
                                                       support it.

                                     const
 fileNameImage     std::string       std::string       Image file name.
                                     &fileName_

                                                       Color to use when
 fillColorImage    Color             const Color       filling drawn
                                     &fillColor_
                                                       objects

                                                       Filter to use when
                                                       resizing image. The
                                                       reduction filter
                                                       employed has a
                                                       sigificant effect on
                                                       the time required to
 filterTypeImage   FilterTypes       FilterTypes       resize an image and
                                     filterType_       the resulting
                                                       quality. The default
                                                       filter is Lanczos
                                                       which has been shown
                                                       to produce good
                                                       results when
                                                       reducing images.

                                                       Text rendering font.
                                                       If the font is a
                                                       fully qualified X
                                                       server font name,
                                                       the font is obtained
                                     const             from an X  server.
 fontImage         std::string       std::string       To use a TrueType
                                     &font_            font, precede the
                                                       TrueType filename
                                                       with an @.
                                                       Otherwise, specify
                                                       a  Postscript font
                                                       name (e.g.
                                                       "helvetica").

 fontPointsize-                      unsigned int      Text rendering font
 Image             unsigned int      pointSize_        point size

                   unsigned int
                   { 0 = Disposal
                   not specified,
                   1 = Do not                          GIF disposal method.
                   dispose of                          This option is used
                   graphic,                            to control how
 gifDispose-       3 = Overwrite     unsigned int      successive frames
 MethodImage       graphic with      disposeMethod_    are rendered (how
                   background color,                   the preceding frame
                                                       is disposed of) when
                   4 = Overwrite                       creating a GIF
                   graphic with                        animation.
                   previous graphic.
                   }

                                                       The type of
                                                       interlacing scheme
                                                       (default
                                                       NoInterlace). This
                                                       option is used to
                                                       specify the type of
                                                       interlacing scheme
                                                       for  raw  image
                                                       formats such as RGB
                                                       or YUV. NoInterlace
                                                       means do not
                                                       interlace,
                                                       LineInterlace uses
                                                       scanline
                                                       interlacing, and
 interlace-                          InterlaceType     PlaneInterlace uses
 TypeImage         InterlaceType     interlace_        plane interlacing.
                                                       PartitionInterlace
                                                       is like
                                                       PlaneInterlace
                                                       except the
                                                       different planes
                                                       are saved  to
                                                       individual files
                                                       (e.g.  image.R,
                                                       image.G, and
                                                       image.B). Use
                                                       LineInterlace or
                                                       PlaneInterlace to
                                                       create an interlaced
                                                       GIF or progressive
                                                       JPEG image.

                                                       Set image validity.
 isValidImage      bool              bool isValid_     Valid images become
                                                       empty (inValid) if
                                                       argument is false.

                                     const
 labelImage        std::string       std::string       Image label
                                     &label_

                                                       Line width for
 lineWidthImage    double            double            drawing lines,
                                     lineWidth_        circles, ellipses,
                                                       etc. See Drawable.

                                      const
 magickImage       std::string       std::string       Get image format
                                     &magick_          (e.g. "GIF")

                                                       True if the image
                                                       has transparency. If
                                                       set True, store
 matteImage        bool              bool matteFlag_   matte channel if
                                                       the image has one
                                                       otherwise create an
                                                       opaque one.


 matteColorImage   Color             const Color       Image matte
                                     &matteColor_      (transparent) color

 monochrome-                                           Transform the image
 Image             bool              bool flag_        to black and white

                                                       Preferred size and
                                                       location of an image
                                                       canvas.

                                                       Use this option to
                                                       specify the
                                                       dimensions and
                                                       position of the
                                                       Postscript page in
                                                       dots per inch or a
 pageImage         Geometry          const Geometry    TEXT page in pixels.
                                     &pageSize_
                                                       This option is
                                                       typically used in
                                                       concert with
                                                       density.

                                                       Page may also be
                                                       used to position a
                                                       GIF image (such as
                                                       for a scene in an
                                                       animation)

                                                       Pen color to use
 penColorImage     Color             const Color       when annotating on
                                     &penColor_
                                                       or drawing on image.

                                                       Texture image to
 penTextureImage   Image             const Image &     paint with (similar
                                     penTexture_
                                                       to penColor).

                                     unsigned int x_,
 pixelColorImage   Color             unsigned int y_,  Get/set pixel color
                                     const Color       at location x & y.
                                     &color_

                                                       Postscript page
                                                       size. Use this
                                                       option to specify
                                                       the dimensions  of
                                                       the Postscript page
 psPageSizeImage   Geometry          const Geometry    in dots per inch or
                                     &pageSize_
                                                       a TEXT page in
                                                       pixels. This option
                                                       is typically used in
                                                       concert with
                                                       density.

                                                       JPEG/MIFF/PNG
 qualityImage      unsigned int (0   unsigned int      compression level
                   to 100)           quality_
                                                       (default 75).

                                                       Preferred number of
                                                       colors in the image.
                                                       The actual number of
                                                       colors in the image
                                                       may be less than
 quantize-                           unsigned int      your request, but
 ColorsImage       unsigned int      colors_           never more. Images
                                                       with less unique
                                                       colors than
                                                       specified with this
                                                       option will have any
                                                       duplicate or unused
                                                       colors removed.

                                                       Colorspace to
                                                       quantize colors in
                                                       (default RGB).
                                                       Empirical evidence
                                                       suggests that
                                                       distances in color
                                                       spaces such as YUV
 quantize-                           ColorspaceType    or YIQ correspond to
 ColorSpaceImage   ColorspaceType    colorSpace_       perceptual color
                                                       differences more
                                                       closely than do
                                                       distances in RGB
                                                       space. These color
                                                       spaces may give
                                                       better results when
                                                       color reducing an
                                                       image.

                                                       Apply
                                                       Floyd/Steinberg
                                                       error diffusion to
                                                       the image. The basic
                                                       strategy of
                                                       dithering is to
                                                       trade  intensity
                                                       resolution  for
                                                       spatial  resolution
                                                       by  averaging the
                                                       intensities  of
 quantize-                                             several
 DitherImage       bool              bool flag_        neighboring  pixels.
                                                       Images which
                                                       suffer  from
                                                       severe  contouring
                                                       when  reducing
                                                       colors can be
                                                       improved with this
                                                       option. The
                                                       quantizeColors or
                                                       monochrome option
                                                       must be set for this
                                                       option to take
                                                       effect.

                                                       Depth of the
                                                       quantization color
                                                       classification tree.
                                                       Values of 0 or 1
                                                       allow selection of
 quantize-         unsigned int (0   unsigned int      the optimal tree
 TreeDepthImage    to 8)             treeDepth_        depth for the color
                                                       reduction algorithm.
                                                       Values between 2 and
                                                       8 may be used to
                                                       manually adjust the
                                                       tree depth.

 rendering-                          RenderingIntent   The type of
 IntentImage       RenderingIntent   render_           rendering intent

 resolution-                         ResolutionType    Units of image
 UnitsImage        ResolutionType    units_            resolution


 sceneImage        unsigned int      unsigned int      Image scene number
                                     scene_

                                                       Width and height of
                                                       a raw image (an
                                                       image which does not
                                                       support width and
                                                       height
 sizeImage         Geometry          const Geometry    information).  Size
                                     &geometry_        may also be used to
                                                       affect the image
                                                       size read from a
                                                       multi-resolution
                                                       format (e.g. Photo
                                                       CD, JBIG, or JPEG.

                                                       Color to use when
 strokeColorImage  Color             const Color       drawing object
                                     &strokeColor_
                                                       outlines


 subImageImage     unsigned int      unsigned int      Subimage of an image
                                     subImage_         sequence

                                                       Number of images
 subRangeImage     unsigned int      unsigned int      relative to the base
                                     subRange_
                                                       image

                                     const
 tileNameImage     std::string       std::string       Tile name
                                     &tileName_

 typeImage         ImageType         ImageType type_   Image storage type.

                                                       Print detailed
 verboseImage      bool              bool              information about
                                     verboseFlag_
                                                       the image

                                     const
 viewImage         std::string       std::string       FlashPix viewing
                                     &view_            parameters.


                                     const             X11 display to
 x11DisplayImage   std::string (e.g. std::string       display to, obtain
                   "hostname:0.0")                     fonts from, or to
                                     &display_
                                                       capture image from




Query Image Format Support

Magick++ provides the coderInfoList() function to support obtaining
information about the image formats supported by ImageMagick. Support for
image formats in ImageMagick is provided by modules known as "coders". A
user-provided container is updated based on a boolean truth-table match. The
truth-table supports matching based on whether ImageMagick can read the
format, write the format, or supports multiple frames for the format. A
wildcard specifier is supported for any "don't care" field. The data
obtained via coderInfoList() may be useful for preparing GUI dialog boxes or
for deciding which output format to write based on support within the
ImageMagick build.

The definition of coderInfoList is:

  class CoderInfo
  {
  public:

    enum MatchType {
      AnyMatch,  // match any coder
      TrueMatch, // match coder if true
      FalseMatch // match coder if false
    };

    [ remaining CoderInfo methods ]

   }

  template <class Container >
  void coderInfoList( Container *container_,
                      CoderInfo::MatchType isReadable_   =
CoderInfo::AnyMatch,
                      CoderInfo::MatchType isWritable_   =
CoderInfo::AnyMatch,
                      CoderInfo::MatchType isMultiFrame_ =
CoderInfo::AnyMatch
                      );

The following example shows how to retrieve a list of all of the coders
which support reading images and print the coder attributes (all listed
formats will be readable):

  list<CoderInfo> coderList;
  coderInfoList( &coderList,           // Reference to output list
                 CoderInfo::TrueMatch, // Match readable formats
                 CoderInfo::AnyMatch,  // Don't care about writable formats
                 CoderInfo::AnyMatch); // Don't care about multi-frame
support
  list<CoderInfo>::iterator entry = coderList.begin();
  while( entry != coderList.end() )
  {
    cout << entry->name() << ": (" << entry->description() << ") : ";
    cout << "Readable = ";
    if ( entry->isReadable() )
      cout << "true";
    else
      cout << "false";
    cout << ", ";
    cout << "Writable = ";
    if ( entry->isWritable() )
      cout << "true";
    else
      cout << "false";
    cout << ", ";
    cout << "Multiframe = ";
    if ( entry->isMultiframe() )
      cout << "true";
    else
      cout << "false";
    cout << endl;
   }


\end{verbatim}
}
