QuantizeImageAcquireQuantizeInfoCloneQuantizeInfoCompressImageColormapDestroyQuantizeInfoGetImageQuantizeErrorGetQuantizeInfoPosterizeImageQuantizeImageQuantizeImagesRemapImageRemapImagesSetGrayscaleImage

QuantizeImage

QuantizeImage() takes a standard RGB or monochrome images and quantizes them down to some fixed number of colors.

For purposes of color allocation, an image is a set of n pixels, where each pixel is a point in RGB space. RGB space is a 3-dimensional vector space, and each pixel, Pi, is defined by an ordered triple of red, green, and blue coordinates, (Ri, Gi, Bi).

Each primary color component (red, green, or blue) represents an intensity which varies linearly from 0 to a maximum value, Cmax, which corresponds to full saturation of that color. Color allocation is defined over a domain consisting of the cube in RGB space with opposite vertices at (0,0,0) and (Cmax, Cmax, Cmax). QUANTIZE requires Cmax = 255.

The algorithm maps this domain onto a tree in which each node represents a cube within that domain. In the following discussion these cubes are defined by the coordinate of two opposite vertices (vertex nearest the origin in RGB space and the vertex farthest from the origin).

The tree's root node represents the entire domain, (0,0,0) through (Cmax,Cmax,Cmax). Each lower level in the tree is generated by subdividing one node's cube into eight smaller cubes of equal size. This corresponds to bisecting the parent cube with planes passing through the midpoints of each edge.

The basic algorithm operates in three phases: Classification, Reduction, and Assignment. Classification builds a color description tree for the image. Reduction collapses the tree until the number it represents, at most, the number of colors desired in the output image. Assignment defines the output image's color map and sets each pixel's color by restorage_class in the reduced tree. Our goal is to minimize the numerical discrepancies between the original colors and quantized colors (quantization error).

Classification begins by initializing a color description tree of sufficient depth to represent each possible input color in a leaf. However, it is impractical to generate a fully-formed color description tree in the storage_class phase for realistic values of Cmax. If colors components in the input image are quantized to k-bit precision, so that Cmax= 2k-1, the tree would need k levels below the root node to allow representing each possible input color in a leaf. This becomes prohibitive because the tree's total number of nodes is 1 + sum(i=1, k, 8k).

A complete tree would require 19,173,961 nodes for k = 8, Cmax = 255.

avoid building a fully populated tree, QUANTIZE

(1) Initializes data structures for nodes only as they are needed; (2) Chooses a maximum depth for the tree as a function of the desired number of colors in the output image (currently log2(colormap size)).

For each pixel in the input image, storage_class scans downward from the root of the color description tree. At each level of the tree it identifies the single node which represents a cube in RGB space containing the pixel's color. It updates the following data for each such node:

    n1: Number of pixels whose color is contained in the RGB cube which
    this node represents;

n2: Number of pixels whose color is not represented in a node at lower depth in the tree; initially, n2 = 0 for all nodes except leaves of the tree.

Sr, Sg, Sb: Sums of the red, green, and blue component values for all pixels not classified at a lower depth. The combination of these sums and n2 will ultimately characterize the mean color of a set of pixels represented by this node.

E: the distance squared in RGB space between each pixel contained within a node and the nodes' center. This represents the quantization error for a node.

Reduction repeatedly prunes the tree until the number of nodes with n2 > 0 is less than or equal to the maximum number of colors allowed in the output image. On any given iteration over the tree, it selects those nodes whose E count is minimal for pruning and merges their color statistics upward. It uses a pruning threshold, Ep, to govern node selection as follows:

Ep = 0 while number of nodes with (n2 > 0) > required maximum number of colors prune all nodes such that E <= Ep Set Ep to minimum E in remaining nodes
This has the effect of minimizing any quantization error when merging two nodes together.
When a node to be pruned has offspring, the pruning procedure invokes itself recursively in order to prune the tree from the leaves upward. n2, Sr, Sg, and Sb in a node being pruned are always added to the corresponding data in that node's parent. This retains the pruned node's color characteristics for later averaging.
For each node, n2 pixels exist for which that node represents the smallest volume in RGB space containing those pixel's colors. When n2 > 0 the node will uniquely define a color in the output image. At the beginning of reduction, n2 = 0 for all nodes except a the leaves of the tree which represent colors present in the input image.
The other pixel count, n1, indicates the total number of colors within the cubic volume which the node represents. This includes n1 - n2 pixels whose colors should be defined by nodes at a lower level in the tree.
Assignment generates the output image from the pruned tree. The output
parts
(1) A color map, which is an array of color descriptions (RGB triples) for each color present in the output image; (2) A pixel array, which represents each pixel as an index into the color map array.
First, the assignment phase makes one pass over the pruned color description tree to establish the image's color map. For each node with n2 > 0, it divides Sr, Sg, and Sb by n2 . This produces the mean color of all pixels that classify no lower than this node. Each of these colors becomes an entry in the color map.
Finally, the assignment phase reclassifies each pixel in the pruned tree to identify the deepest node containing the pixel's color. The pixel's value in the pixel array becomes the index of this node's mean color in the color map.
This method is based on a similar algorithm written by Paul Raveling.

AcquireQuantizeInfo

AcquireQuantizeInfo() allocates the QuantizeInfo structure.

The format of the AcquireQuantizeInfo method is:

QuantizeInfo *AcquireQuantizeInfo(const ImageInfo *image_info)

A description of each parameter follows:

image_info
the image info.

CloneQuantizeInfo

CloneQuantizeInfo() makes a duplicate of the given quantize info structure, or if quantize info is NULL, a new one.

The format of the CloneQuantizeInfo method is:

QuantizeInfo *CloneQuantizeInfo(const QuantizeInfo *quantize_info)

A description of each parameter follows:

clone_info
Method CloneQuantizeInfo returns a duplicate of the given quantize info, or if image info is NULL a new one.
quantize_info
a structure of type info.

CompressImageColormap

CompressImageColormap() compresses an image colormap by removing any duplicate or unused color entries.

The format of the CompressImageColormap method is:

MagickBooleanType CompressImageColormap(Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

DestroyQuantizeInfo

DestroyQuantizeInfo() deallocates memory associated with an QuantizeInfo structure.

The format of the DestroyQuantizeInfo method is:

QuantizeInfo *DestroyQuantizeInfo(QuantizeInfo *quantize_info)

A description of each parameter follows:

quantize_info
Specifies a pointer to an QuantizeInfo structure.

GetImageQuantizeError

GetImageQuantizeError() measures the difference between the original and quantized images. This difference is the total quantization error. The error is computed by summing over all pixels in an image the distance squared in RGB space between each reference pixel value and its quantized value. These values are computed:

    o mean_error_per_pixel:  This value is the mean error for any single
pixel in the image.
normalized_mean_square_error

This value is the normalized mean quantization error for any single pixel in the image. This distance measure is normalized to a range between 0 and 1. It is independent of the range of red, green, and blue values in the image.

normalized_maximum_square_error

Thsi value is the normalized maximum quantization error for any single pixel in the image. This distance measure is normalized to a range between 0 and 1. It is independent of the range of red, green, and blue values in your image.

The format of the GetImageQuantizeError method is:

MagickBooleanType GetImageQuantizeError(Image *image,
  ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

exception

return any errors or warnings in this structure.

GetQuantizeInfo

GetQuantizeInfo() initializes the QuantizeInfo structure.

The format of the GetQuantizeInfo method is:

GetQuantizeInfo(QuantizeInfo *quantize_info)

A description of each parameter follows:

quantize_info
Specifies a pointer to a QuantizeInfo structure.

PosterizeImage

PosterizeImage() reduces the image to a limited number of colors for a "poster" effect.

The format of the PosterizeImage method is:

MagickBooleanType PosterizeImage(Image *image,const size_t levels,
  const DitherMethod dither_method,ExceptionInfo *exception)

A description of each parameter follows:

image
Specifies a pointer to an Image structure.
levels
Number of color levels allowed in each channel. Very low values (2, 3, or 4) have the most visible effect.
dither_method
choose from UndefinedDitherMethod, NoDitherMethod, RiemersmaDitherMethod, FloydSteinbergDitherMethod.
exception
return any errors or warnings in this structure.

QuantizeImage

QuantizeImage() analyzes the colors within a reference image and chooses a fixed number of colors to represent the image. The goal of the algorithm is to minimize the color difference between the input and output image while minimizing the processing time.

The format of the QuantizeImage method is:

MagickBooleanType QuantizeImage(const QuantizeInfo *quantize_info,
  Image *image,ExceptionInfo *exception)

A description of each parameter follows:

quantize_info
Specifies a pointer to an QuantizeInfo structure.
image
the image.
exception
return any errors or warnings in this structure.

QuantizeImages

QuantizeImages() analyzes the colors within a set of reference images and chooses a fixed number of colors to represent the set. The goal of the algorithm is to minimize the color difference between the input and output images while minimizing the processing time.

The format of the QuantizeImages method is:

MagickBooleanType QuantizeImages(const QuantizeInfo *quantize_info,
  Image *images,ExceptionInfo *exception)

A description of each parameter follows:

quantize_info
Specifies a pointer to an QuantizeInfo structure.
images
Specifies a pointer to a list of Image structures.
exception
return any errors or warnings in this structure.

RemapImage

RemapImage() replaces the colors of an image with the closest of the colors from the reference image.

The format of the RemapImage method is:

MagickBooleanType RemapImage(const QuantizeInfo *quantize_info,
  Image *image,const Image *remap_image,ExceptionInfo *exception)

A description of each parameter follows:

quantize_info
Specifies a pointer to an QuantizeInfo structure.
image
the image.
remap_image
the reference image.
exception
return any errors or warnings in this structure.

RemapImages

RemapImages() replaces the colors of a sequence of images with the closest color from a reference image.

The format of the RemapImage method is:

MagickBooleanType RemapImages(const QuantizeInfo *quantize_info,
  Image *images,Image *remap_image,ExceptionInfo *exception)

A description of each parameter follows:

quantize_info
Specifies a pointer to an QuantizeInfo structure.
images
the image sequence.
remap_image
the reference image.
exception
return any errors or warnings in this structure.

SetGrayscaleImage

SetGrayscaleImage() converts an image to a PseudoClass grayscale image.

The format of the SetGrayscaleImage method is:

MagickBooleanType SetGrayscaleImage(Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
The image.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Read or Write Binary Large OBjects

BlobToImageFileToImageGetBlobPropertiesImageToBlobImageToFileImagesToBlobInjectImageBlob

BlobToImage

BlobToImage() implements direct to memory image formats. It returns the blob as an image.

The format of the BlobToImage method is:

Image *BlobToImage(const ImageInfo *image_info,const void *blob,
  const size_t length,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
blob
the address of a character stream in one of the image formats understood by ImageMagick.
length
This size_t integer reflects the length in bytes of the blob.
exception
return any errors or warnings in this structure.

FileToImage

FileToImage() write the contents of a file to an image.

The format of the FileToImage method is:

MagickBooleanType FileToImage(Image *,const char *filename)

A description of each parameter follows:

image
the image.
filename
the filename.

GetBlobProperties

GetBlobProperties() returns information about an image blob.

The format of the GetBlobProperties method is:

const struct stat *GetBlobProperties(const Image *image)

A description of each parameter follows:

image
the image.

ImageToBlob

ImageToBlob() implements direct to memory image formats. It returns the image as a formatted blob and its length. The magick member of the Image structure determines the format of the returned blob (GIF, JPEG, PNG, etc.). This method is the equivalent of WriteImage(), but writes the formatted "file" to a memory buffer rather than to an actual file.

The format of the ImageToBlob method is:

void *ImageToBlob(const ImageInfo *image_info,Image *image,
  size_t *length,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
image
the image.
length
return the actual length of the blob.
exception
return any errors or warnings in this structure.

ImageToFile

ImageToFile() writes an image to a file. It returns MagickFalse if an error occurs otherwise MagickTrue.

The format of the ImageToFile method is:

 MagickBooleanType ImageToFile(Image *image,char *filename,
   ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
filename
Write the image to this file.
exception
return any errors or warnings in this structure.

ImagesToBlob

ImagesToBlob() implements direct to memory image formats. It returns the image sequence as a blob and its length. The magick member of the ImageInfo structure determines the format of the returned blob (GIF, JPEG, PNG, etc.)

Note, some image formats do not permit multiple images to the same image stream (e.g. JPEG). in this instance, just the first image of the sequence is returned as a blob.

The format of the ImagesToBlob method is:

void *ImagesToBlob(const ImageInfo *image_info,Image *images,
  size_t *length,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
images
the image list.
length
return the actual length of the blob.
exception
return any errors or warnings in this structure.

InjectImageBlob

InjectImageBlob() injects the image with a copy of itself in the specified format (e.g. inject JPEG into a PDF image).

The format of the InjectImageBlob method is:

MagickBooleanType InjectImageBlob(const ImageInfo *image_info,
  Image *image,Image *inject_image,const char *format,
  ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info..
image
the image.
inject_image
inject into the image stream.
format
the image format.
exception
return any errors or warnings in this structure.
ImageMagick: MagickWand, C API for ImageMagick: Drawing Wand Methods

ClearDrawingWandCloneDrawingWandDestroyDrawingWandDrawAffineDrawAlphaDrawAnnotationDrawArcDrawBezierDrawCircleDrawClearExceptionDrawCloneExceptionInfoDrawCompositeDrawColorDrawCommentDrawEllipseDrawGetBorderColorDrawGetClipPathDrawGetClipRuleDrawGetClipUnitsDrawGetDensityDrawGetExceptionDrawGetExceptionTypeDrawGetFillColorDrawGetFillOpacityDrawGetFillRuleDrawGetFontDrawGetFontFamilyDrawGetFontResolutionDrawGetFontSizeDrawGetFontStretchDrawGetFontStyleDrawGetFontWeightDrawGetGravityDrawGetOpacityDrawGetStrokeAntialiasDrawGetStrokeColorDrawGetStrokeDashArrayDrawGetStrokeDashOffsetDrawGetStrokeLineCapDrawGetStrokeLineJoinDrawGetStrokeMiterLimitDrawGetStrokeOpacityDrawGetStrokeWidthDrawGetTextAlignmentDrawGetTextAntialiasDrawGetTextDecorationDrawGetTextDirectionDrawGetTextEncodingDrawGetTextKerningDrawGetTextInterlineSpacingDrawGetTextInterwordSpacingDrawGetVectorGraphicsDrawGetTextUnderColorDrawLineDrawPathCloseDrawPathCurveToAbsoluteDrawPathCurveToRelativeDrawPathCurveToQuadraticBezierAbsoluteDrawPathCurveToQuadraticBezierRelativeDrawPathCurveToQuadraticBezierSmoothAbsoluteDrawPathCurveToQuadraticBezierSmoothRelativeDrawPathCurveToSmoothAbsoluteDrawPathCurveToSmoothRelativeDrawPathEllipticArcAbsoluteDrawPathEllipticArcRelativeDrawPathFinishDrawPathLineToAbsoluteDrawPathLineToRelativeDrawPathLineToHorizontalAbsoluteDrawPathLineToHorizontalRelativeDrawPathLineToVerticalAbsoluteDrawPathLineToVerticalRelativeDrawPathMoveToAbsoluteDrawPathMoveToRelativeDrawPathStartDrawPointDrawPolygonDrawPolylineDrawPopClipPathDrawPopDefsDrawPopPatternDrawPushClipPathDrawPushDefsDrawPushPatternDrawRectangleDrawResetVectorGraphicsDrawRotateDrawRoundRectangleDrawScaleDrawSetBorderColorDrawSetClipPathDrawSetClipRuleDrawSetClipUnitsDrawSetDensityDrawSetFillColorDrawSetFillOpacityDrawSetFontResolutionDrawSetOpacityDrawSetFillPatternURLDrawSetFillRuleDrawSetFontDrawSetFontFamilyDrawSetFontSizeDrawSetFontStretchDrawSetFontStyleDrawSetFontWeightDrawSetGravityDrawSetStrokeColorDrawSetStrokePatternURLDrawSetStrokeAntialiasDrawSetStrokeDashArrayDrawSetStrokeDashOffsetDrawSetStrokeLineCapDrawSetStrokeLineJoinDrawSetStrokeMiterLimitDrawSetStrokeOpacityDrawSetStrokeWidthDrawSetTextAlignmentDrawSetTextAntialiasDrawSetTextDecorationDrawSetTextEncodingDrawSetTextKerningDrawSetTextInterlineSpacingDrawSetTextInterwordSpacingDrawSetTextUnderColorDrawSetVectorGraphicsDrawSkewXDrawSkewYDrawTranslateDrawSetViewboxIsDrawingWandNewDrawingWandPeekDrawingWandPopDrawingWandPushDrawingWand

ClearDrawingWand

ClearDrawingWand() clears resources associated with the drawing wand.

The format of the ClearDrawingWand method is:

void ClearDrawingWand(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand to clear.

CloneDrawingWand

CloneDrawingWand() makes an exact copy of the specified wand.

The format of the CloneDrawingWand method is:

DrawingWand *CloneDrawingWand(const DrawingWand *wand)

A description of each parameter follows:

wand
the magick wand.

DestroyDrawingWand

DestroyDrawingWand() frees all resources associated with the drawing wand. Once the drawing wand has been freed, it should not be used and further unless it re-allocated.

The format of the DestroyDrawingWand method is:

DrawingWand *DestroyDrawingWand(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand to destroy.

DrawAffine

DrawAffine() adjusts the current affine transformation matrix with the specified affine transformation matrix. Note that the current affine transform is adjusted rather than replaced.

The format of the DrawAffine method is:

void DrawAffine(DrawingWand *wand,const AffineMatrix *affine)

A description of each parameter follows:

wand
Drawing wand
affine
Affine matrix parameters

DrawAlpha

DrawAlpha() paints on the image's alpha channel in order to set effected pixels to transparent. to influence the alpha of pixels. The available paint methods are:

    PointMethod: Select the target pixel
    ReplaceMethod: Select any pixel that matches the target pixel.
    FloodfillMethod: Select the target pixel and matching neighbors.
    FillToBorderMethod: Select the target pixel and neighbors not matching
border color.
    ResetMethod: Select all pixels.

The format of the DrawAlpha method is:

void DrawAlpha(DrawingWand *wand,const double x,const double y,
  const PaintMethod paint_method)

A description of each parameter follows:

wand
the drawing wand.
x
x ordinate
y
y ordinate
paint_method
paint method.

DrawAnnotation

DrawAnnotation() draws text on the image.

The format of the DrawAnnotation method is:

void DrawAnnotation(DrawingWand *wand,const double x,
  const double y,const unsigned char *text)

A description of each parameter follows:

wand
the drawing wand.
x
x ordinate to left of text
y
y ordinate to text baseline
text
text to draw

DrawArc

DrawArc() draws an arc falling within a specified bounding rectangle on the image.

The format of the DrawArc method is:

void DrawArc(DrawingWand *wand,const double sx,const double sy,
  const double ex,const double ey,const double sd,const double ed)

A description of each parameter follows:

wand
the drawing wand.
sx
starting x ordinate of bounding rectangle
sy
starting y ordinate of bounding rectangle
ex
ending x ordinate of bounding rectangle
ey
ending y ordinate of bounding rectangle
sd
starting degrees of rotation
ed
ending degrees of rotation

DrawBezier

DrawBezier() draws a bezier curve through a set of points on the image.

The format of the DrawBezier method is:

void DrawBezier(DrawingWand *wand,
  const size_t number_coordinates,const PointInfo *coordinates)

A description of each parameter follows:

wand
the drawing wand.
number_coordinates
number of coordinates
coordinates
coordinates

DrawCircle

DrawCircle() draws a circle on the image.

The format of the DrawCircle method is:

void DrawCircle(DrawingWand *wand,const double ox,
  const double oy,const double px, const double py)

A description of each parameter follows:

wand
the drawing wand.
ox
origin x ordinate
oy
origin y ordinate
px
perimeter x ordinate
py
perimeter y ordinate

DrawClearException

DrawClearException() clear any exceptions associated with the wand.

The format of the DrawClearException method is:

MagickBooleanType DrawClearException(DrawWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawCloneExceptionInfo

DrawCloneExceptionInfo() clones the ExceptionInfo structure within the wand.

The format of the DrawCloneExceptionInfo method is:

ExceptionInfo *DrawCloneExceptionInfo(DrawWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawComposite

DrawComposite() composites an image onto the current image, using the specified composition operator, specified position, and at the specified size.

The format of the DrawComposite method is:

MagickBooleanType DrawComposite(DrawingWand *wand,
  const CompositeOperator compose,const double x,
  const double y,const double width,const double height,
  MagickWand *magick_wand)

A description of each parameter follows:

wand
the drawing wand.
compose
composition operator
x
x ordinate of top left corner
y
y ordinate of top left corner
width
Width to resize image to prior to compositing. Specify zero to use existing width.
height
Height to resize image to prior to compositing. Specify zero to use existing height.
magick_wand
Image to composite is obtained from this wand.

DrawColor

DrawColor() draws color on image using the current fill color, starting at specified position, and using specified paint method. The available paint methods are:

    PointMethod: Recolors the target pixel
    ReplaceMethod: Recolor any pixel that matches the target pixel.
    FloodfillMethod: Recolors target pixels and matching neighbors.
    ResetMethod: Recolor all pixels.

The format of the DrawColor method is:

void DrawColor(DrawingWand *wand,const double x,const double y,
  const PaintMethod paint_method)

A description of each parameter follows:

wand
the drawing wand.
x
x ordinate.
y
y ordinate.
paint_method
paint method.

DrawComment

DrawComment() adds a comment to a vector output stream.

The format of the DrawComment method is:

void DrawComment(DrawingWand *wand,const char *comment)

A description of each parameter follows:

wand
the drawing wand.
comment
comment text

DrawEllipse

DrawEllipse() draws an ellipse on the image.

The format of the DrawEllipse method is:

 void DrawEllipse(DrawingWand *wand,const double ox,const double oy,
   const double rx,const double ry,const double start,const double end)

A description of each parameter follows:

wand
the drawing wand.
ox
origin x ordinate
oy
origin y ordinate
rx
radius in x
ry
radius in y
start
starting rotation in degrees
end
ending rotation in degrees

DrawGetBorderColor

DrawGetBorderColor() returns the border color used for drawing bordered objects.

The format of the DrawGetBorderColor method is:

void DrawGetBorderColor(const DrawingWand *wand,
  PixelWand *border_color)

A description of each parameter follows:

wand
the drawing wand.
border_color
Return the border color.

DrawGetClipPath

DrawGetClipPath() obtains the current clipping path ID. The value returned must be deallocated by the user when it is no longer needed.

The format of the DrawGetClipPath method is:

char *DrawGetClipPath(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetClipRule

DrawGetClipRule() returns the current polygon fill rule to be used by the clipping path.

The format of the DrawGetClipRule method is:

     FillRule DrawGetClipRule(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetClipUnits

DrawGetClipUnits() returns the interpretation of clip path units.

The format of the DrawGetClipUnits method is:

ClipPathUnits DrawGetClipUnits(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetDensity

DrawGetDensity() obtains the vertical and horizontal resolution. The value returned must be deallocated by the user when it is no longer needed.

The format of the DrawGetDensity method is:

char *DrawGetDensity(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetException

DrawGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.

The format of the DrawGetException method is:

char *DrawGetException(const DrawWand *wand,
  ExceptionType *severity)

A description of each parameter follows:

wand
the drawing wand.
severity
the severity of the error is returned here.

DrawGetExceptionType

DrawGetExceptionType() the exception type associated with the wand. If no exception has occurred, UndefinedExceptionType is returned.

The format of the DrawGetExceptionType method is:

ExceptionType DrawGetExceptionType(const DrawWand *wand)

A description of each parameter follows:

wand
the magick wand.

DrawGetFillColor

DrawGetFillColor() returns the fill color used for drawing filled objects.

The format of the DrawGetFillColor method is:

void DrawGetFillColor(const DrawingWand *wand,
  PixelWand *fill_color)

A description of each parameter follows:

wand
the drawing wand.
fill_color
Return the fill color.

DrawGetFillOpacity

DrawGetFillOpacity() returns the alpha used when drawing using the fill color or fill texture. Fully opaque is 1.0.

The format of the DrawGetFillOpacity method is:

double DrawGetFillOpacity(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetFillRule

DrawGetFillRule() returns the fill rule used while drawing polygons.

The format of the DrawGetFillRule method is:

FillRule DrawGetFillRule(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetFont

DrawGetFont() returns a null-terminaged string specifying the font used when annotating with text. The value returned must be freed by the user when no longer needed.

The format of the DrawGetFont method is:

char *DrawGetFont(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetFontFamily

DrawGetFontFamily() returns the font family to use when annotating with text. The value returned must be freed by the user when it is no longer needed.

The format of the DrawGetFontFamily method is:

char *DrawGetFontFamily(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetFontResolution

DrawGetFontResolution() gets the image X and Y resolution.

The format of the DrawGetFontResolution method is:

MagickBooleanType DrawGetFontResolution(const DrawingWand *wand,
  double *x,double *y)

A description of each parameter follows:

wand
the magick wand.
x
the x-resolution.
y
the y-resolution.

DrawGetFontSize

DrawGetFontSize() returns the font pointsize used when annotating with text.

The format of the DrawGetFontSize method is:

double DrawGetFontSize(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetFontStretch

DrawGetFontStretch() returns the font stretch used when annotating with text.

The format of the DrawGetFontStretch method is:

StretchType DrawGetFontStretch(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetFontStyle

DrawGetFontStyle() returns the font style used when annotating with text.

The format of the DrawGetFontStyle method is:

StyleType DrawGetFontStyle(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetFontWeight

DrawGetFontWeight() returns the font weight used when annotating with text.

The format of the DrawGetFontWeight method is:

size_t DrawGetFontWeight(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetGravity

DrawGetGravity() returns the text placement gravity used when annotating with text.

The format of the DrawGetGravity method is:

GravityType DrawGetGravity(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetOpacity

DrawGetOpacity() returns the alpha used when drawing with the fill or stroke color or texture. Fully opaque is 1.0.

The format of the DrawGetOpacity method is:

double DrawGetOpacity(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetStrokeAntialias

DrawGetStrokeAntialias() returns the current stroke antialias setting. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used.

The format of the DrawGetStrokeAntialias method is:

MagickBooleanType DrawGetStrokeAntialias(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetStrokeColor

DrawGetStrokeColor() returns the color used for stroking object outlines.

The format of the DrawGetStrokeColor method is:

void DrawGetStrokeColor(const DrawingWand *wand,
  PixelWand *stroke_color)

A description of each parameter follows:

wand
the drawing wand.
stroke_color
Return the stroke color.

DrawGetStrokeDashArray

DrawGetStrokeDashArray() returns an array representing the pattern of dashes and gaps used to stroke paths (see DrawSetStrokeDashArray). The array must be freed once it is no longer required by the user.

The format of the DrawGetStrokeDashArray method is:

double *DrawGetStrokeDashArray(const DrawingWand *wand,
  size_t *number_elements)

A description of each parameter follows:

wand
the drawing wand.
number_elements
address to place number of elements in dash array

DrawGetStrokeDashOffset

DrawGetStrokeDashOffset() returns the offset into the dash pattern to start the dash.

The format of the DrawGetStrokeDashOffset method is:

double DrawGetStrokeDashOffset(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetStrokeLineCap

DrawGetStrokeLineCap() returns the shape to be used at the end of open subpaths when they are stroked. Values of LineCap are UndefinedCap, ButtCap, RoundCap, and SquareCap.

The format of the DrawGetStrokeLineCap method is:

LineCap DrawGetStrokeLineCap(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetStrokeLineJoin

DrawGetStrokeLineJoin() returns the shape to be used at the corners of paths (or other vector shapes) when they are stroked. Values of LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.

The format of the DrawGetStrokeLineJoin method is:

LineJoin DrawGetStrokeLineJoin(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetStrokeMiterLimit

DrawGetStrokeMiterLimit() returns the miter limit. When two line segments meet at a sharp angle and miter joins have been specified for 'lineJoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'.

The format of the DrawGetStrokeMiterLimit method is:

size_t DrawGetStrokeMiterLimit(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetStrokeOpacity

DrawGetStrokeOpacity() returns the alpha of stroked object outlines.

The format of the DrawGetStrokeOpacity method is:

double DrawGetStrokeOpacity(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetStrokeWidth

DrawGetStrokeWidth() returns the width of the stroke used to draw object outlines.

The format of the DrawGetStrokeWidth method is:

double DrawGetStrokeWidth(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetTextAlignment

DrawGetTextAlignment() returns the alignment applied when annotating with text.

The format of the DrawGetTextAlignment method is:

AlignType DrawGetTextAlignment(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetTextAntialias

DrawGetTextAntialias() returns the current text antialias setting, which determines whether text is antialiased. Text is antialiased by default.

The format of the DrawGetTextAntialias method is:

MagickBooleanType DrawGetTextAntialias(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetTextDecoration

DrawGetTextDecoration() returns the decoration applied when annotating with text.

The format of the DrawGetTextDecoration method is:

DecorationType DrawGetTextDecoration(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetTextDirection

DrawGetTextDirection() returns the direction that will be used when annotating with text.

The format of the DrawGetTextDirection method is:

DirectionType DrawGetTextDirection(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetTextEncoding

DrawGetTextEncoding() returns a null-terminated string which specifies the code set used for text annotations. The string must be freed by the user once it is no longer required.

The format of the DrawGetTextEncoding method is:

char *DrawGetTextEncoding(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetTextKerning

DrawGetTextKerning() gets the spacing between characters in text.

The format of the DrawSetFontKerning method is:

double DrawGetTextKerning(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetTextInterlineSpacing

DrawGetTextInterlineSpacing() gets the spacing between lines in text.

The format of the DrawGetTextInterlineSpacing method is:

double DrawGetTextInterlineSpacing(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetTextInterwordSpacing

DrawGetTextInterwordSpacing() gets the spacing between words in text.

The format of the DrawSetFontKerning method is:

double DrawGetTextInterwordSpacing(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetVectorGraphics

DrawGetVectorGraphics() returns a null-terminated string which specifies the vector graphics generated by any graphics calls made since the wand was instantiated. The string must be freed by the user once it is no longer required.

The format of the DrawGetVectorGraphics method is:

char *DrawGetVectorGraphics(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawGetTextUnderColor

DrawGetTextUnderColor() returns the color of a background rectangle to place under text annotations.

The format of the DrawGetTextUnderColor method is:

void DrawGetTextUnderColor(const DrawingWand *wand,
  PixelWand *under_color)

A description of each parameter follows:

wand
the drawing wand.
under_color
Return the under color.

DrawLine

DrawLine() draws a line on the image using the current stroke color, stroke alpha, and stroke width.

The format of the DrawLine method is:

void DrawLine(DrawingWand *wand,const double sx,const double sy,
  const double ex,const double ey)

A description of each parameter follows:

wand
the drawing wand.
sx
starting x ordinate
sy
starting y ordinate
ex
ending x ordinate
ey
ending y ordinate

DrawPathClose

DrawPathClose() adds a path element to the current path which closes the current subpath by drawing a straight line from the current point to the current subpath's most recent starting point (usually, the most recent moveto point).

The format of the DrawPathClose method is:

void DrawPathClose(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawPathCurveToAbsolute

DrawPathCurveToAbsolute() draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve using absolute coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

The format of the DrawPathCurveToAbsolute method is:

void DrawPathCurveToAbsolute(DrawingWand *wand,const double x1,
  const double y1,const double x2,const double y2,const double x,
  const double y)

A description of each parameter follows:

wand
the drawing wand.
x1
x ordinate of control point for curve beginning
y1
y ordinate of control point for curve beginning
x2
x ordinate of control point for curve ending
y2
y ordinate of control point for curve ending
x
x ordinate of the end of the curve
y
y ordinate of the end of the curve

DrawPathCurveToRelative

DrawPathCurveToRelative() draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve using relative coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

The format of the DrawPathCurveToRelative method is:

void DrawPathCurveToRelative(DrawingWand *wand,const double x1,
  const double y1,const double x2,const double y2,const double x,
  const double y)

A description of each parameter follows:

wand
the drawing wand.
x1
x ordinate of control point for curve beginning
y1
y ordinate of control point for curve beginning
x2
x ordinate of control point for curve ending
y2
y ordinate of control point for curve ending
x
x ordinate of the end of the curve
y
y ordinate of the end of the curve

DrawPathCurveToQuadraticBezierAbsolute

DrawPathCurveToQuadraticBezierAbsolute() draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point using absolute coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

The format of the DrawPathCurveToQuadraticBezierAbsolute method is:

void DrawPathCurveToQuadraticBezierAbsolute(DrawingWand *wand,
  const double x1,const double y1,onst double x,const double y)

A description of each parameter follows:

wand
the drawing wand.
x1
x ordinate of the control point
y1
y ordinate of the control point
x
x ordinate of final point
y
y ordinate of final point

DrawPathCurveToQuadraticBezierRelative

DrawPathCurveToQuadraticBezierRelative() draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point using relative coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

The format of the DrawPathCurveToQuadraticBezierRelative method is:

void DrawPathCurveToQuadraticBezierRelative(DrawingWand *wand,
  const double x1,const double y1,const double x,const double y)

A description of each parameter follows:

wand
the drawing wand.
x1
x ordinate of the control point
y1
y ordinate of the control point
x
x ordinate of final point
y
y ordinate of final point

DrawPathCurveToQuadraticBezierSmoothAbsolute

DrawPathCurveToQuadraticBezierSmoothAbsolute() draws a quadratic Bezier curve (using absolute coordinates) from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a DrawPathCurveToQuadraticBezierAbsolute, DrawPathCurveToQuadraticBezierRelative, DrawPathCurveToQuadraticBezierSmoothAbsolute or DrawPathCurveToQuadraticBezierSmoothRelative, assume the control point is coincident with the current point.). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

The format of the DrawPathCurveToQuadraticBezierSmoothAbsolute method is:

void DrawPathCurveToQuadraticBezierSmoothAbsolute(
  DrawingWand *wand,const double x,const double y)

A description of each parameter follows:

wand
the drawing wand.
x
x ordinate of final point
y
y ordinate of final point

DrawPathCurveToQuadraticBezierSmoothRelative

DrawPathCurveToQuadraticBezierSmoothRelative() draws a quadratic Bezier curve (using relative coordinates) from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a DrawPathCurveToQuadraticBezierAbsolute, DrawPathCurveToQuadraticBezierRelative, DrawPathCurveToQuadraticBezierSmoothAbsolute or DrawPathCurveToQuadraticBezierSmoothRelative, assume the control point is coincident with the current point.). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

The format of the DrawPathCurveToQuadraticBezierSmoothRelative method is:

void DrawPathCurveToQuadraticBezierSmoothRelative(DrawingWand *wand,
  const double x,const double y)

A description of each parameter follows:

wand
the drawing wand.
x
x ordinate of final point
y
y ordinate of final point

DrawPathCurveToSmoothAbsolute

DrawPathCurveToSmoothAbsolute() draws a cubic Bezier curve from the current point to (x,y) using absolute coordinates. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an DrawPathCurveToAbsolute, DrawPathCurveToRelative, DrawPathCurveToSmoothAbsolute or DrawPathCurveToSmoothRelative, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

The format of the DrawPathCurveToSmoothAbsolute method is:

void DrawPathCurveToSmoothAbsolute(DrawingWand *wand,
  const double x2,const double y2,const double x,const double y)

A description of each parameter follows:

wand
the drawing wand.
x2
x ordinate of second control point
y2
y ordinate of second control point
x
x ordinate of termination point
y
y ordinate of termination point

DrawPathCurveToSmoothRelative

DrawPathCurveToSmoothRelative() draws a cubic Bezier curve from the current point to (x,y) using relative coordinates. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an DrawPathCurveToAbsolute, DrawPathCurveToRelative, DrawPathCurveToSmoothAbsolute or DrawPathCurveToSmoothRelative, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.

The format of the DrawPathCurveToSmoothRelative method is:

void DrawPathCurveToSmoothRelative(DrawingWand *wand,
  const double x2,const double y2,const double x,const double y)

A description of each parameter follows:

wand
the drawing wand.
x2
x ordinate of second control point
y2
y ordinate of second control point
x
x ordinate of termination point
y
y ordinate of termination point

DrawPathEllipticArcAbsolute

DrawPathEllipticArcAbsolute() draws an elliptical arc from the current point to (x, y) using absolute coordinates. The size and orientation of the ellipse are defined by two radii (rx, ry) and an xAxisRotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automagically to satisfy the constraints imposed by the other parameters. largeArcFlag and sweepFlag contribute to the automatic calculations and help determine how the arc is drawn. If largeArcFlag is true then draw the larger of the available arcs. If sweepFlag is true, then draw the arc matching a clock-wise rotation.

The format of the DrawPathEllipticArcAbsolute method is:

void DrawPathEllipticArcAbsolute(DrawingWand *wand,
  const double rx,const double ry,const double x_axis_rotation,
  const MagickBooleanType large_arc_flag,
  const MagickBooleanType sweep_flag,const double x,const double y)

A description of each parameter follows:

wand
the drawing wand.
rx
x radius
ry
y radius
x_axis_rotation
indicates how the ellipse as a whole is rotated relative to the current coordinate system
large_arc_flag
If non-zero (true) then draw the larger of the available arcs
sweep_flag
If non-zero (true) then draw the arc matching a clock-wise rotation

DrawPathEllipticArcRelative

DrawPathEllipticArcRelative() draws an elliptical arc from the current point to (x, y) using relative coordinates. The size and orientation of the ellipse are defined by two radii (rx, ry) and an xAxisRotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automagically to satisfy the constraints imposed by the other parameters. largeArcFlag and sweepFlag contribute to the automatic calculations and help determine how the arc is drawn. If largeArcFlag is true then draw the larger of the available arcs. If sweepFlag is true, then draw the arc matching a clock-wise rotation.

The format of the DrawPathEllipticArcRelative method is:

void DrawPathEllipticArcRelative(DrawingWand *wand,
  const double rx,const double ry,const double x_axis_rotation,
  const MagickBooleanType large_arc_flag,
  const MagickBooleanType sweep_flag,const double x,const double y)

A description of each parameter follows:

wand
the drawing wand.
rx
x radius
ry
y radius
x_axis_rotation
indicates how the ellipse as a whole is rotated relative to the current coordinate system
large_arc_flag
If non-zero (true) then draw the larger of the available arcs
sweep_flag
If non-zero (true) then draw the arc matching a clock-wise rotation

DrawPathFinish

DrawPathFinish() terminates the current path.

The format of the DrawPathFinish method is:

void DrawPathFinish(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawPathLineToAbsolute

DrawPathLineToAbsolute() draws a line path from the current point to the given coordinate using absolute coordinates. The coordinate then becomes the new current point.

The format of the DrawPathLineToAbsolute method is:

void DrawPathLineToAbsolute(DrawingWand *wand,const double x,
  const double y)

A description of each parameter follows:

wand
the drawing wand.
x
target x ordinate
y
target y ordinate

DrawPathLineToRelative

DrawPathLineToRelative() draws a line path from the current point to the given coordinate using relative coordinates. The coordinate then becomes the new current point.

The format of the DrawPathLineToRelative method is:

void DrawPathLineToRelative(DrawingWand *wand,const double x,
  const double y)

A description of each parameter follows:

wand
the drawing wand.
x
target x ordinate
y
target y ordinate

DrawPathLineToHorizontalAbsolute

DrawPathLineToHorizontalAbsolute() draws a horizontal line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point.

The format of the DrawPathLineToHorizontalAbsolute method is:

void DrawPathLineToHorizontalAbsolute(DrawingWand *wand,const double x)

A description of each parameter follows:

wand
the drawing wand.
x
target x ordinate

DrawPathLineToHorizontalRelative

DrawPathLineToHorizontalRelative() draws a horizontal line path from the current point to the target point using relative coordinates. The target point then becomes the new current point.

The format of the DrawPathLineToHorizontalRelative method is:

void DrawPathLineToHorizontalRelative(DrawingWand *wand,
  const double x)

A description of each parameter follows:

wand
the drawing wand.
x
target x ordinate

DrawPathLineToVerticalAbsolute

DrawPathLineToVerticalAbsolute() draws a vertical line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point.

The format of the DrawPathLineToVerticalAbsolute method is:

void DrawPathLineToVerticalAbsolute(DrawingWand *wand,
  const double y)

A description of each parameter follows:

wand
the drawing wand.
y
target y ordinate

DrawPathLineToVerticalRelative

DrawPathLineToVerticalRelative() draws a vertical line path from the current point to the target point using relative coordinates. The target point then becomes the new current point.

The format of the DrawPathLineToVerticalRelative method is:

void DrawPathLineToVerticalRelative(DrawingWand *wand,
  const double y)

A description of each parameter follows:

wand
the drawing wand.
y
target y ordinate

DrawPathMoveToAbsolute

DrawPathMoveToAbsolute() starts a new sub-path at the given coordinate using absolute coordinates. The current point then becomes the specified coordinate.

The format of the DrawPathMoveToAbsolute method is:

void DrawPathMoveToAbsolute(DrawingWand *wand,const double x,
  const double y)

A description of each parameter follows:

wand
the drawing wand.
x
target x ordinate
y
target y ordinate

DrawPathMoveToRelative

DrawPathMoveToRelative() starts a new sub-path at the given coordinate using relative coordinates. The current point then becomes the specified coordinate.

The format of the DrawPathMoveToRelative method is:

void DrawPathMoveToRelative(DrawingWand *wand,const double x,
  const double y)

A description of each parameter follows:

wand
the drawing wand.
x
target x ordinate
y
target y ordinate

DrawPathStart

DrawPathStart() declares the start of a path drawing list which is terminated by a matching DrawPathFinish() command. All other DrawPath commands must be enclosed between a DrawPathStart() and a DrawPathFinish() command. This is because path drawing commands are subordinate commands and they do not function by themselves.

The format of the DrawPathStart method is:

void DrawPathStart(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawPoint

DrawPoint() draws a point using the current fill color.

The format of the DrawPoint method is:

void DrawPoint(DrawingWand *wand,const double x,const double y)

A description of each parameter follows:

wand
the drawing wand.
x
target x coordinate
y
target y coordinate

DrawPolygon

DrawPolygon() draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.

The format of the DrawPolygon method is:

void DrawPolygon(DrawingWand *wand,
  const size_t number_coordinates,const PointInfo *coordinates)

A description of each parameter follows:

wand
the drawing wand.
number_coordinates
number of coordinates
coordinates
coordinate array

DrawPolyline

DrawPolyline() draws a polyline using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.

The format of the DrawPolyline method is:

void DrawPolyline(DrawingWand *wand,
  const size_t number_coordinates,const PointInfo *coordinates)

A description of each parameter follows:

wand
the drawing wand.
number_coordinates
number of coordinates
coordinates
coordinate array

DrawPopClipPath

DrawPopClipPath() terminates a clip path definition.

The format of the DrawPopClipPath method is:

void DrawPopClipPath(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawPopDefs

DrawPopDefs() terminates a definition list.

The format of the DrawPopDefs method is:

void DrawPopDefs(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawPopPattern

DrawPopPattern() terminates a pattern definition.

The format of the DrawPopPattern method is:

MagickBooleanType DrawPopPattern(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawPushClipPath

DrawPushClipPath() starts a clip path definition which is comprized of any number of drawing commands and terminated by a DrawPopClipPath() command.

The format of the DrawPushClipPath method is:

void DrawPushClipPath(DrawingWand *wand,const char *clip_mask_id)

A description of each parameter follows:

wand
the drawing wand.
clip_mask_id
string identifier to associate with the clip path for later use.

DrawPushDefs

DrawPushDefs() indicates that commands up to a terminating DrawPopDefs() command create named elements (e.g. clip-paths, textures, etc.) which may safely be processed earlier for the sake of efficiency.

The format of the DrawPushDefs method is:

void DrawPushDefs(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawPushPattern

DrawPushPattern() indicates that subsequent commands up to a DrawPopPattern() command comprise the definition of a named pattern. The pattern space is assigned top left corner coordinates, a width and height, and becomes its own drawing space. Anything which can be drawn may be used in a pattern definition. Named patterns may be used as stroke or brush definitions.

The format of the DrawPushPattern method is:

MagickBooleanType DrawPushPattern(DrawingWand *wand,
  const char *pattern_id,const double x,const double y,
  const double width,const double height)

A description of each parameter follows:

wand
the drawing wand.
pattern_id
pattern identification for later reference
x
x ordinate of top left corner
y
y ordinate of top left corner
width
width of pattern space
height
height of pattern space

DrawRectangle

DrawRectangle() draws a rectangle given two coordinates and using the current stroke, stroke width, and fill settings.

The format of the DrawRectangle method is:

void DrawRectangle(DrawingWand *wand,const double x1,
  const double y1,const double x2,const double y2)

A description of each parameter follows:

x1
x ordinate of first coordinate
y1
y ordinate of first coordinate
x2
x ordinate of second coordinate
y2
y ordinate of second coordinate

DrawResetVectorGraphics

DrawResetVectorGraphics() resets the vector graphics associated with the specified wand.

The format of the DrawResetVectorGraphics method is:

void DrawResetVectorGraphics(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

DrawRotate

DrawRotate() applies the specified rotation to the current coordinate space.

The format of the DrawRotate method is:

void DrawRotate(DrawingWand *wand,const double degrees)

A description of each parameter follows:

wand
the drawing wand.
degrees
degrees of rotation

DrawRoundRectangle

DrawRoundRectangle() draws a rounted rectangle given two coordinates, x & y corner radiuses and using the current stroke, stroke width, and fill settings.

The format of the DrawRoundRectangle method is:

void DrawRoundRectangle(DrawingWand *wand,double x1,double y1,
  double x2,double y2,double rx,double ry)

A description of each parameter follows:

wand
the drawing wand.
x1
x ordinate of first coordinate
y1
y ordinate of first coordinate
x2
x ordinate of second coordinate
y2
y ordinate of second coordinate
rx
radius of corner in horizontal direction
ry
radius of corner in vertical direction

DrawScale

DrawScale() adjusts the scaling factor to apply in the horizontal and vertical directions to the current coordinate space.

The format of the DrawScale method is:

void DrawScale(DrawingWand *wand,const double x,const double y)

A description of each parameter follows:

wand
the drawing wand.
x
horizontal scale factor
y
vertical scale factor

DrawSetBorderColor

DrawSetBorderColor() sets the border color to be used for drawing bordered objects.

The format of the DrawSetBorderColor method is:

void DrawSetBorderColor(DrawingWand *wand,const PixelWand *border_wand)

A description of each parameter follows:

wand
the drawing wand.
border_wand
border wand.

DrawSetClipPath

DrawSetClipPath() associates a named clipping path with the image. Only the areas drawn on by the clipping path will be modified as ssize_t as it remains in effect.

The format of the DrawSetClipPath method is:

MagickBooleanType DrawSetClipPath(DrawingWand *wand,
  const char *clip_mask)

A description of each parameter follows:

wand
the drawing wand.
clip_mask
name of clipping path to associate with image

DrawSetClipRule

DrawSetClipRule() set the polygon fill rule to be used by the clipping path.

The format of the DrawSetClipRule method is:

void DrawSetClipRule(DrawingWand *wand,const FillRule fill_rule)

A description of each parameter follows:

wand
the drawing wand.
fill_rule
fill rule (EvenOddRule or NonZeroRule)

DrawSetClipUnits

DrawSetClipUnits() sets the interpretation of clip path units.

The format of the DrawSetClipUnits method is:

void DrawSetClipUnits(DrawingWand *wand,
  const ClipPathUnits clip_units)

A description of each parameter follows:

wand
the drawing wand.
clip_units
units to use (UserSpace, UserSpaceOnUse, or ObjectBoundingBox)

DrawSetDensity

DrawSetDensity() sets the vertical and horizontal resolution.

The format of the DrawSetDensity method is:

MagickBooleanType DrawSetDensity(DrawingWand *wand,
  const char *density)

A description of each parameter follows:

wand
the drawing wand.
density
the vertical and horizontal resolution.

DrawSetFillColor

DrawSetFillColor() sets the fill color to be used for drawing filled objects.

The format of the DrawSetFillColor method is:

void DrawSetFillColor(DrawingWand *wand,const PixelWand *fill_wand)

A description of each parameter follows:

wand
the drawing wand.
fill_wand
fill wand.

DrawSetFillOpacity

DrawSetFillOpacity() sets the alpha to use when drawing using the fill color or fill texture. Fully opaque is 1.0.

The format of the DrawSetFillOpacity method is:

void DrawSetFillOpacity(DrawingWand *wand,const double fill_alpha)

A description of each parameter follows:

wand
the drawing wand.
fill_opacity
fill opacity

DrawSetFontResolution

DrawSetFontResolution() sets the image resolution.

The format of the DrawSetFontResolution method is:

MagickBooleanType DrawSetFontResolution(DrawingWand *wand,
  const double x_resolution,const double y_resolution)

A description of each parameter follows:

wand
the magick wand.
x_resolution
the image x resolution.
y_resolution
the image y resolution.

DrawSetOpacity

DrawSetOpacity() sets the alpha to use when drawing using the fill or stroke color or texture. Fully opaque is 1.0.

The format of the DrawSetOpacity method is:

void DrawSetOpacity(DrawingWand *wand,const double alpha)

A description of each parameter follows:

wand
the drawing wand.
opacity
fill and stroke opacity. The value 1.0 is opaque.

DrawSetFillPatternURL

DrawSetFillPatternURL() sets the URL to use as a fill pattern for filling objects. Only local URLs ("#identifier") are supported at this time. These local URLs are normally created by defining a named fill pattern with DrawPushPattern/DrawPopPattern.

The format of the DrawSetFillPatternURL method is:

MagickBooleanType DrawSetFillPatternURL(DrawingWand *wand,
  const char *fill_url)

A description of each parameter follows:

wand
the drawing wand.
fill_url
URL to use to obtain fill pattern.

DrawSetFillRule

DrawSetFillRule() sets the fill rule to use while drawing polygons.

The format of the DrawSetFillRule method is:

void DrawSetFillRule(DrawingWand *wand,const FillRule fill_rule)

A description of each parameter follows:

wand
the drawing wand.
fill_rule
fill rule (EvenOddRule or NonZeroRule)

DrawSetFont

DrawSetFont() sets the fully-sepecified font to use when annotating with text.

The format of the DrawSetFont method is:

MagickBooleanType DrawSetFont(DrawingWand *wand,const char *font_name)

A description of each parameter follows:

wand
the drawing wand.
font_name
font name

DrawSetFontFamily

DrawSetFontFamily() sets the font family to use when annotating with text.

The format of the DrawSetFontFamily method is:

MagickBooleanType DrawSetFontFamily(DrawingWand *wand,
  const char *font_family)

A description of each parameter follows:

wand
the drawing wand.
font_family
font family

DrawSetFontSize

DrawSetFontSize() sets the font pointsize to use when annotating with text.

The format of the DrawSetFontSize method is:

void DrawSetFontSize(DrawingWand *wand,const double pointsize)

A description of each parameter follows:

wand
the drawing wand.
pointsize
text pointsize

DrawSetFontStretch

DrawSetFontStretch() sets the font stretch to use when annotating with text. The AnyStretch enumeration acts as a wild-card "don't care" option.

The format of the DrawSetFontStretch method is:

void DrawSetFontStretch(DrawingWand *wand,
  const StretchType font_stretch)

A description of each parameter follows:

wand
the drawing wand.
font_stretch
font stretch (NormalStretch, UltraCondensedStretch, CondensedStretch, SemiCondensedStretch, SemiExpandedStretch, ExpandedStretch, ExtraExpandedStretch, UltraExpandedStretch, AnyStretch)

DrawSetFontStyle

DrawSetFontStyle() sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option.

The format of the DrawSetFontStyle method is:

void DrawSetFontStyle(DrawingWand *wand,const StyleType style)

A description of each parameter follows:

wand
the drawing wand.
style
font style (NormalStyle, ItalicStyle, ObliqueStyle, AnyStyle)

DrawSetFontWeight

DrawSetFontWeight() sets the font weight to use when annotating with text.

The format of the DrawSetFontWeight method is:

void DrawSetFontWeight(DrawingWand *wand,
  const size_t font_weight)

A description of each parameter follows:

wand
the drawing wand.
font_weight
font weight (valid range 100-900)

DrawSetGravity

DrawSetGravity() sets the text placement gravity to use when annotating with text.

The format of the DrawSetGravity method is:

void DrawSetGravity(DrawingWand *wand,const GravityType gravity)

A description of each parameter follows:

wand
the drawing wand.
gravity
positioning gravity (NorthWestGravity, NorthGravity, NorthEastGravity, WestGravity, CenterGravity, EastGravity, SouthWestGravity, SouthGravity, SouthEastGravity)

DrawSetStrokeColor

DrawSetStrokeColor() sets the color used for stroking object outlines.

The format of the DrawSetStrokeColor method is:

void DrawSetStrokeColor(DrawingWand *wand,
  const PixelWand *stroke_wand)

A description of each parameter follows:

wand
the drawing wand.
stroke_wand
stroke wand.

DrawSetStrokePatternURL

DrawSetStrokePatternURL() sets the pattern used for stroking object outlines.

The format of the DrawSetStrokePatternURL method is:

MagickBooleanType DrawSetStrokePatternURL(DrawingWand *wand,
  const char *stroke_url)

A description of each parameter follows:

wand
the drawing wand.
stroke_url
URL specifying pattern ID (e.g. "#pattern_id")

DrawSetStrokeAntialias

DrawSetStrokeAntialias() controls whether stroked outlines are antialiased. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used.

The format of the DrawSetStrokeAntialias method is:

void DrawSetStrokeAntialias(DrawingWand *wand,
  const MagickBooleanType stroke_antialias)

A description of each parameter follows:

wand
the drawing wand.
stroke_antialias
set to false (zero) to disable antialiasing

DrawSetStrokeDashArray

DrawSetStrokeDashArray() specifies the pattern of dashes and gaps used to stroke paths. The stroke dash array represents an array of numbers that specify the lengths of alternating dashes and gaps in pixels. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. To remove an existing dash array, pass a zero number_elements argument and null dasharray. A typical stroke dash array might contain the members 5 3 2.

The format of the DrawSetStrokeDashArray method is:

MagickBooleanType DrawSetStrokeDashArray(DrawingWand *wand,
  const size_t number_elements,const double *dasharray)

A description of each parameter follows:

wand
the drawing wand.
number_elements
number of elements in dash array
dasharray
dash array values

DrawSetStrokeDashOffset

DrawSetStrokeDashOffset() specifies the offset into the dash pattern to start the dash.

The format of the DrawSetStrokeDashOffset method is:

void DrawSetStrokeDashOffset(DrawingWand *wand,
  const double dash_offset)

A description of each parameter follows:

wand
the drawing wand.
dash_offset
dash offset

DrawSetStrokeLineCap

DrawSetStrokeLineCap() specifies the shape to be used at the end of open subpaths when they are stroked. Values of LineCap are UndefinedCap, ButtCap, RoundCap, and SquareCap.

The format of the DrawSetStrokeLineCap method is:

void DrawSetStrokeLineCap(DrawingWand *wand,
  const LineCap linecap)

A description of each parameter follows:

wand
the drawing wand.
linecap
linecap style

DrawSetStrokeLineJoin

DrawSetStrokeLineJoin() specifies the shape to be used at the corners of paths (or other vector shapes) when they are stroked. Values of LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.

The format of the DrawSetStrokeLineJoin method is:

void DrawSetStrokeLineJoin(DrawingWand *wand,
  const LineJoin linejoin)

A description of each parameter follows:

wand
the drawing wand.
linejoin
line join style

DrawSetStrokeMiterLimit

DrawSetStrokeMiterLimit() specifies the miter limit. When two line segments meet at a sharp angle and miter joins have been specified for 'lineJoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'.

The format of the DrawSetStrokeMiterLimit method is:

void DrawSetStrokeMiterLimit(DrawingWand *wand,
  const size_t miterlimit)

A description of each parameter follows:

wand
the drawing wand.
miterlimit
miter limit

DrawSetStrokeOpacity

DrawSetStrokeOpacity() specifies the alpha of stroked object outlines.

The format of the DrawSetStrokeOpacity method is:

void DrawSetStrokeOpacity(DrawingWand *wand,
  const double stroke_alpha)

A description of each parameter follows:

wand
the drawing wand.
opacity
stroke opacity. The value 1.0 is opaque.

DrawSetStrokeWidth

DrawSetStrokeWidth() sets the width of the stroke used to draw object outlines.

The format of the DrawSetStrokeWidth method is:

void DrawSetStrokeWidth(DrawingWand *wand,
  const double stroke_width)

A description of each parameter follows:

wand
the drawing wand.
stroke_width
stroke width

DrawSetTextAlignment

DrawSetTextAlignment() specifies a text alignment to be applied when annotating with text.

The format of the DrawSetTextAlignment method is:

void DrawSetTextAlignment(DrawingWand *wand,const AlignType alignment)

A description of each parameter follows:

wand
the drawing wand.
alignment
text alignment. One of UndefinedAlign, LeftAlign, CenterAlign, or RightAlign.

DrawSetTextAntialias

DrawSetTextAntialias() controls whether text is antialiased. Text is antialiased by default.

The format of the DrawSetTextAntialias method is:

void DrawSetTextAntialias(DrawingWand *wand,
  const MagickBooleanType text_antialias)

A description of each parameter follows:

wand
the drawing wand.
text_antialias
antialias boolean. Set to false (0) to disable antialiasing.

DrawSetTextDecoration

DrawSetTextDecoration() specifies a decoration to be applied when annotating with text.

The format of the DrawSetTextDecoration method is:

void DrawSetTextDecoration(DrawingWand *wand,
  const DecorationType decoration)

A description of each parameter follows:

wand
the drawing wand.
decoration
text decoration. One of NoDecoration, UnderlineDecoration, OverlineDecoration, or LineThroughDecoration

DrawSetTextEncoding

DrawSetTextEncoding() specifies the code set to use for text annotations. The only character encoding which may be specified at this time is "UTF-8" for representing Unicode as a sequence of bytes. Specify an empty string to set text encoding to the system's default. Successful text annotation using Unicode may require fonts designed to support Unicode.

The format of the DrawSetTextEncoding method is:

void DrawSetTextEncoding(DrawingWand *wand,const char *encoding)

A description of each parameter follows:

wand
the drawing wand.
encoding
character string specifying text encoding

DrawSetTextKerning

DrawSetTextKerning() sets the spacing between characters in text.

The format of the DrawSetTextKerning method is:

void DrawSetTextKerning(DrawingWand *wand,const double kerning)

A description of each parameter follows:

wand
the drawing wand.
kerning
text kerning

DrawSetTextInterlineSpacing

DrawSetTextInterlineSpacing() sets the spacing between line in text.

The format of the DrawSetInterlineSpacing method is:

void DrawSetTextInterlineSpacing(DrawingWand *wand,
  const double interline_spacing)

A description of each parameter follows:

wand
the drawing wand.
interline_spacing
text line spacing

DrawSetTextInterwordSpacing

DrawSetTextInterwordSpacing() sets the spacing between words in text.

The format of the DrawSetInterwordSpacing method is:

void DrawSetTextInterwordSpacing(DrawingWand *wand,
  const double interword_spacing)

A description of each parameter follows:

wand
the drawing wand.
interword_spacing
text word spacing

DrawSetTextUnderColor

DrawSetTextUnderColor() specifies the color of a background rectangle to place under text annotations.

The format of the DrawSetTextUnderColor method is:

void DrawSetTextUnderColor(DrawingWand *wand,
  const PixelWand *under_wand)

A description of each parameter follows:

wand
the drawing wand.
under_wand
text under wand.

DrawSetVectorGraphics

DrawSetVectorGraphics() sets the vector graphics associated with the specified wand. Use this method with DrawGetVectorGraphics() as a method to persist the vector graphics state.

The format of the DrawSetVectorGraphics method is:

MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
  const char *xml)

A description of each parameter follows:

wand
the drawing wand.
xml
the drawing wand XML.

DrawSkewX

DrawSkewX() skews the current coordinate system in the horizontal direction.

The format of the DrawSkewX method is:

void DrawSkewX(DrawingWand *wand,const double degrees)

A description of each parameter follows:

wand
the drawing wand.
degrees
number of degrees to skew the coordinates

DrawSkewY

DrawSkewY() skews the current coordinate system in the vertical direction.

The format of the DrawSkewY method is:

void DrawSkewY(DrawingWand *wand,const double degrees)

A description of each parameter follows:

wand
the drawing wand.
degrees
number of degrees to skew the coordinates

DrawTranslate

DrawTranslate() applies a translation to the current coordinate system which moves the coordinate system origin to the specified coordinate.

The format of the DrawTranslate method is:

void DrawTranslate(DrawingWand *wand,const double x,
  const double y)

A description of each parameter follows:

wand
the drawing wand.
x
new x ordinate for coordinate system origin
y
new y ordinate for coordinate system origin

DrawSetViewbox

DrawSetViewbox() sets the overall canvas size to be recorded with the drawing vector data. Usually this will be specified using the same size as the canvas image. When the vector data is saved to SVG or MVG formats, the viewbox is use to specify the size of the canvas image that a viewer will render the vector data on.

The format of the DrawSetViewbox method is:

void DrawSetViewbox(DrawingWand *wand,const double x1,const double y1,
  const double x2,const double y2)

A description of each parameter follows:

wand
the drawing wand.
x1
left x ordinate
y1
top y ordinate
x2
right x ordinate
y2
bottom y ordinate

IsDrawingWand

IsDrawingWand() returns MagickTrue if the wand is verified as a drawing wand.

The format of the IsDrawingWand method is:

MagickBooleanType IsDrawingWand(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

NewDrawingWand

NewDrawingWand() returns a drawing wand required for all other methods in the API.

The format of the NewDrawingWand method is:

DrawingWand *NewDrawingWand(void)

PeekDrawingWand

PeekDrawingWand() returns the current drawing wand.

The format of the PeekDrawingWand method is:

DrawInfo *PeekDrawingWand(const DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

PopDrawingWand

PopDrawingWand() destroys the current drawing wand and returns to the previously pushed drawing wand. Multiple drawing wands may exist. It is an error to attempt to pop more drawing wands than have been pushed, and it is proper form to pop all drawing wands which have been pushed.

The format of the PopDrawingWand method is:

MagickBooleanType PopDrawingWand(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.

PushDrawingWand

PushDrawingWand() clones the current drawing wand to create a new drawing wand. The original drawing wand(s) may be returned to by invoking PopDrawingWand(). The drawing wands are stored on a drawing wand stack. For every Pop there must have already been an equivalent Push.

The format of the PushDrawingWand method is:

MagickBooleanType PushDrawingWand(DrawingWand *wand)

A description of each parameter follows:

wand
the drawing wand.
ImageMagick: MagickCore, C API for ImageMagick: Interactively Display and Edit an Image

DisplayImagesRemoteDisplayCommandXDisplayBackgroundImage

DisplayImages

DisplayImages() displays an image sequence to any X window screen. It returns a value other than 0 if successful. Check the exception member of image to determine the reason for any failure.

The format of the DisplayImages method is:

MagickBooleanType DisplayImages(const ImageInfo *image_info,
  Image *images,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
image
the image.
exception
return any errors or warnings in this structure.

RemoteDisplayCommand

RemoteDisplayCommand() encourages a remote display program to display the specified image filename.

The format of the RemoteDisplayCommand method is:

MagickBooleanType RemoteDisplayCommand(const ImageInfo *image_info,
  const char *window,const char *filename,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
window
Specifies the name or id of an X window.
filename
the name of the image filename to display.
exception
return any errors or warnings in this structure.

XDisplayBackgroundImage

XDisplayBackgroundImage() displays an image in the background of a window.

The format of the XDisplayBackgroundImage method is:

MagickBooleanType XDisplayBackgroundImage(Display *display,
  XResourceInfo *resource_info,Image *image,ExceptionInfo *exception)

A description of each parameter follows:

display
Specifies a connection to an X server; returned from XOpenDisplay.
resource_info
Specifies a pointer to a X11 XResourceInfo structure.
image
the image.
exception
return any errors or warnings in this structure.
ImageMagick: MagickWand, C API for ImageMagick: Command-line Interface

MagickCommandGenesis

MagickCommandGenesis

MagickCommandGenesis() applies image processing options to an image as prescribed by command line options.

It wiil look for special options like "-debug", "-bench", and "-distribute-cache" that needs to be applied even before the main processing begins, and may completely overrule normal command processing. Such 'Genesis' Options can only be given on the CLI, (not in a script) and are typically ignored (as they have been handled) if seen later.

The format of the MagickCommandGenesis method is:

MagickBooleanType MagickCommandGenesis(ImageInfo *image_info,
  MagickCommand command,int argc,char **argv,char **metadata,
  ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
command
Choose from ConvertImageCommand, IdentifyImageCommand, MogrifyImageCommand, CompositeImageCommand, CompareImagesCommand, ConjureImageCommand, StreamImageCommand, ImportImageCommand, DisplayImageCommand, or AnimateImageCommand.
argc
Specifies a pointer to an integer describing the number of elements in the argument vector.
argv
Specifies a pointer to a text array containing the command line arguments.
metadata
any metadata is returned here.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Decorate an Image

BorderImageFrameImageRaiseImage

BorderImage

BorderImage() surrounds the image with a border of the color defined by the bordercolor member of the image structure. The width and height of the border are defined by the corresponding members of the border_info structure.

The format of the BorderImage method is:

Image *BorderImage(const Image *image,const RectangleInfo *border_info,
  const CompositeOperator compose,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
border_info
define the width and height of the border.
compose
the composite operator.
exception
return any errors or warnings in this structure.

FrameImage

FrameImage() adds a simulated three-dimensional border around the image. The color of the border is defined by the matte_color member of image. Members width and height of frame_info specify the border width of the vertical and horizontal sides of the frame. Members inner and outer indicate the width of the inner and outer shadows of the frame.

The format of the FrameImage method is:

Image *FrameImage(const Image *image,const FrameInfo *frame_info,
  const CompositeOperator compose,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
frame_info
Define the width and height of the frame and its bevels.
compose
the composite operator.
exception
return any errors or warnings in this structure.

RaiseImage

RaiseImage() creates a simulated three-dimensional button-like effect by lightening and darkening the edges of the image. Members width and height of raise_info define the width of the vertical and horizontal edge of the effect.

The format of the RaiseImage method is:

MagickBooleanType RaiseImage(const Image *image,
  const RectangleInfo *raise_info,const MagickBooleanType raise,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
raise_info
Define the width and height of the raise area.
raise
A value other than zero creates a 3-D raise effect, otherwise it has a lowered effect.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Mime Methods

AcquireMimeCacheGetMimeInfoListGetMimeListGetMimeDescriptionGetMimeTypeListMimeInfo

AcquireMimeCache

AcquireMimeCache() caches one or more magic configurations which provides a mapping between magic attributes and a magic name.

The format of the AcquireMimeCache method is:

LinkedListInfo *AcquireMimeCache(const char *filename,
  ExceptionInfo *exception)

A description of each parameter follows:

filename
the font file name.
exception
return any errors or warnings in this structure.

GetMimeInfoList

GetMimeInfoList() returns any image aliases that match the specified pattern.

The magic of the GetMimeInfoList function is:

const MimeInfo **GetMimeInfoList(const char *pattern,
  size_t *number_aliases,ExceptionInfo *exception)

A description of each parameter follows:

pattern
Specifies a pointer to a text string containing a pattern.
number_aliases
This integer returns the number of magics in the list.
exception
return any errors or warnings in this structure.

GetMimeList

GetMimeList() returns any image format alias that matches the specified pattern.

The format of the GetMimeList function is:

char **GetMimeList(const char *pattern,size_t *number_aliases,
  ExceptionInfo *exception)

A description of each parameter follows:

pattern
Specifies a pointer to a text string containing a pattern.
number_aliases
This integer returns the number of image format aliases in the list.
exception
return any errors or warnings in this structure.

GetMimeDescription

GetMimeDescription() returns the mime type description.

The format of the GetMimeDescription method is:

const char *GetMimeDescription(const MimeInfo *mime_info)

A description of each parameter follows:

mime_info
The magic info.

GetMimeType

GetMimeType() returns the mime type.

The format of the GetMimeType method is:

const char *GetMimeType(const MimeInfo *mime_info)

A description of each parameter follows:

mime_info
The magic info.

ListMimeInfo

ListMimeInfo() lists the magic info to a file.

The format of the ListMimeInfo method is:

MagickBooleanType ListMimeInfo(FILE *file,ExceptionInfo *exception)

A description of each parameter follows.

file

An pointer to a FILE.

exception

return any errors or warnings in this structure.

ImageMagick: MagickCore, C API for ImageMagick: Paint on an Image

FloodfillPaintImageOilPaintImageOpaquePaintImageTransparentPaintImageTransparentPaintImageChroma

FloodfillPaintImage

FloodfillPaintImage() changes the color value of any pixel that matches target and is an immediate neighbor. If the method FillToBorderMethod is specified, the color value is changed for any neighbor pixel that does not match the bordercolor member of image.

By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.

The format of the FloodfillPaintImage method is:

MagickBooleanType FloodfillPaintImage(Image *image,
  const DrawInfo *draw_info,const PixelInfo target,
  const ssize_t x_offset,const ssize_t y_offset,
  const MagickBooleanType invert,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
target
the RGB value of the target color.
x_offset,y_offset
the starting location of the operation.
invert
paint any pixel that does not match the target color.
exception
return any errors or warnings in this structure.

OilPaintImage

OilPaintImage() applies a special effect filter that simulates an oil painting. Each pixel is replaced by the most frequent color occurring in a circular region defined by radius.

The format of the OilPaintImage method is:

Image *OilPaintImage(const Image *image,const double radius,
  const double sigma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the circular neighborhood.
sigma
the standard deviation of the Gaussian, in pixels.
exception
return any errors or warnings in this structure.

OpaquePaintImage

OpaquePaintImage() changes any pixel that matches color with the color defined by fill argument.

By default color must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. Fuzz defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.

The format of the OpaquePaintImage method is:

MagickBooleanType OpaquePaintImage(Image *image,const PixelInfo *target,
  const PixelInfo *fill,const MagickBooleanType invert,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
target
the RGB value of the target color.
fill
the replacement color.
invert
paint any pixel that does not match the target color.
exception
return any errors or warnings in this structure.

TransparentPaintImage

TransparentPaintImage() changes the opacity value associated with any pixel that matches color to the value defined by opacity.

By default color must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. Fuzz defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.

The format of the TransparentPaintImage method is:

MagickBooleanType TransparentPaintImage(Image *image,
  const PixelInfo *target,const Quantum opacity,
  const MagickBooleanType invert,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
target
the target color.
opacity
the replacement opacity value.
invert
paint any pixel that does not match the target color.
exception
return any errors or warnings in this structure.

TransparentPaintImageChroma

TransparentPaintImageChroma() changes the opacity value associated with any pixel that matches color to the value defined by opacity.

As there is one fuzz value for the all the channels, TransparentPaintImage() is not suitable for the operations like chroma, where the tolerance for similarity of two color component (RGB) can be different. Thus we define this method to take two target pixels (one low and one high) and all the pixels of an image which are lying between these two pixels are made transparent.

The format of the TransparentPaintImageChroma method is:

MagickBooleanType TransparentPaintImageChroma(Image *image,
  const PixelInfo *low,const PixelInfo *high,const Quantum opacity,
  const MagickBooleanType invert,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
low
the low target color.
high
the high target color.
opacity
the replacement opacity value.
invert
paint any pixel that does not match the target color.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Enhance an Image

AutoGammaImageAutoLevelImageBrightnessContrastImageClutImageColorDecisionListImageContrastImageContrastStretchImageEnhanceImageEqualizeImageGammaImageGrayscaleImageHaldClutImageLevelImageLevelizeImageLevelImageColorsLinearStretchImageModulateImageNegateImageThe NormalizeImageSigmoidalContrastImage

AutoGammaImage

AutoGammaImage() extract the 'mean' from the image and adjust the image to try make set its gamma appropriatally.

The format of the AutoGammaImage method is:

MagickBooleanType AutoGammaImage(Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
The image to auto-level
exception
return any errors or warnings in this structure.

AutoLevelImage

AutoLevelImage() adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.

The format of the LevelImage method is:

MagickBooleanType AutoLevelImage(Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
The image to auto-level
exception
return any errors or warnings in this structure.

BrightnessContrastImage

BrightnessContrastImage() changes the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image.

The format of the BrightnessContrastImage method is:

MagickBooleanType BrightnessContrastImage(Image *image,
  const double brightness,const double contrast,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
brightness
the brightness percent (-100 .. 100).
contrast
the contrast percent (-100 .. 100).
exception
return any errors or warnings in this structure.

ClutImage

ClutImage() replaces each color value in the given image, by using it as an index to lookup a replacement color value in a Color Look UP Table in the form of an image. The values are extracted along a diagonal of the CLUT image so either a horizontal or vertial gradient image can be used.

Typically this is used to either re-color a gray-scale image according to a color gradient in the CLUT image, or to perform a freeform histogram (level) adjustment according to the (typically gray-scale) gradient in the CLUT image.

When the 'channel' mask includes the matte/alpha transparency channel but one image has no such channel it is assumed that that image is a simple gray-scale image that will effect the alpha channel values, either for gray-scale coloring (with transparent or semi-transparent colors), or a histogram adjustment of existing alpha channel values. If both images have matte channels, direct and normal indexing is applied, which is rarely used.

The format of the ClutImage method is:

MagickBooleanType ClutImage(Image *image,Image *clut_image,
  const PixelInterpolateMethod method,ExceptionInfo *exception)

A description of each parameter follows:

image
the image, which is replaced by indexed CLUT values
clut_image
the color lookup table image for replacement color values.
method
the pixel interpolation method.
exception
return any errors or warnings in this structure.

ColorDecisionListImage

ColorDecisionListImage() accepts a lightweight Color Correction Collection (CCC) file which solely contains one or more color corrections and applies the correction to the image. Here is a sample CCC file:

    <ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2">
    <ColorCorrection id="cc03345">
          <SOPNode>
               <Slope> 0.9 1.2 0.5 </Slope>
               <Offset> 0.4 -0.5 0.6 </Offset>
               <Power> 1.0 0.8 1.5 </Power>
          </SOPNode>
          <SATNode>
               <Saturation> 0.85 </Saturation>
          </SATNode>
    </ColorCorrection>
    </ColorCorrectionCollection>

which includes the slop, offset, and power for each of the RGB channels as well as the saturation.

The format of the ColorDecisionListImage method is:

MagickBooleanType ColorDecisionListImage(Image *image,
  const char *color_correction_collection,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
color_correction_collection
the color correction collection in XML.
exception
return any errors or warnings in this structure.

ContrastImage

ContrastImage() enhances the intensity differences between the lighter and darker elements of the image. Set sharpen to a MagickTrue to increase the image contrast otherwise the contrast is reduced.

The format of the ContrastImage method is:

MagickBooleanType ContrastImage(Image *image,
  const MagickBooleanType sharpen,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
sharpen
Increase or decrease image contrast.
exception
return any errors or warnings in this structure.

ContrastStretchImage

ContrastStretchImage() is a simple image enhancement technique that attempts to improve the contrast in an image by 'stretching' the range of intensity values it contains to span a desired range of values. It differs from the more sophisticated histogram equalization in that it can only apply a linear scaling function to the image pixel values. As a result the 'enhancement' is less harsh.

The format of the ContrastStretchImage method is:

MagickBooleanType ContrastStretchImage(Image *image,
  const char *levels,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
black_point
the black point.
white_point
the white point.
levels
Specify the levels where the black and white points have the range of 0 to number-of-pixels (e.g. 1, 10x90, etc.).
exception
return any errors or warnings in this structure.

EnhanceImage

EnhanceImage() applies a digital filter that improves the quality of a noisy image.

The format of the EnhanceImage method is:

Image *EnhanceImage(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

EqualizeImage

EqualizeImage() applies a histogram equalization to the image.

The format of the EqualizeImage method is:

MagickBooleanType EqualizeImage(Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

GammaImage

GammaImage() gamma-corrects a particular image channel. The same image viewed on different devices will have perceptual differences in the way the image's intensities are represented on the screen. Specify individual gamma levels for the red, green, and blue channels, or adjust all three with the gamma parameter. Values typically range from 0.8 to 2.3.

You can also reduce the influence of a particular channel with a gamma value of 0.

The format of the GammaImage method is:

MagickBooleanType GammaImage(Image *image,const double gamma,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
level
the image gamma as a string (e.g. 1.6,1.2,1.0).
gamma
the image gamma.

GrayscaleImage

GrayscaleImage() converts the image to grayscale.

The format of the GrayscaleImage method is:

MagickBooleanType GrayscaleImage(Image *image,
  const PixelIntensityMethod method ,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
method
the pixel intensity method.
exception
return any errors or warnings in this structure.

HaldClutImage

HaldClutImage() applies a Hald color lookup table to the image. A Hald color lookup table is a 3-dimensional color cube mapped to 2 dimensions. Create it with the HALD coder. You can apply any color transformation to the Hald image and then use this method to apply the transform to the image.

The format of the HaldClutImage method is:

MagickBooleanType HaldClutImage(Image *image,Image *hald_image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image, which is replaced by indexed CLUT values
hald_image
the color lookup table image for replacement color values.
exception
return any errors or warnings in this structure.

LevelImage

LevelImage() adjusts the levels of a particular image channel by scaling the colors falling between specified white and black points to the full available quantum range.

The parameters provided represent the black, and white points. The black point specifies the darkest color in the image. Colors darker than the black point are set to zero. White point specifies the lightest color in the image. Colors brighter than the white point are set to the maximum quantum value.

If a '!' flag is given, map black and white colors to the given levels rather than mapping those levels to black and white. See LevelizeImage() below.

Gamma specifies a gamma correction to apply to the image.

The format of the LevelImage method is:

MagickBooleanType LevelImage(Image *image,const double black_point,
  const double white_point,const double gamma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
black_point
The level to map zero (black) to.
white_point
The level to map QuantumRange (white) to.
exception
return any errors or warnings in this structure.

LevelizeImage

LevelizeImage() applies the reversed LevelImage() operation to just the specific channels specified. It compresses the full range of color values, so that they lie between the given black and white points. Gamma is applied before the values are mapped.

LevelizeImage() can be called with by using a +level command line API option, or using a '!' on a -level or LevelImage() geometry string.

It can be used to de-contrast a greyscale image to the exact levels specified. Or by using specific levels for each channel of an image you can convert a gray-scale image to any linear color gradient, according to those levels.

The format of the LevelizeImage method is:

MagickBooleanType LevelizeImage(Image *image,const double black_point,
  const double white_point,const double gamma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
black_point
The level to map zero (black) to.
white_point
The level to map QuantumRange (white) to.
gamma
adjust gamma by this factor before mapping values.
exception
return any errors or warnings in this structure.

LevelImageColors

LevelImageColors() maps the given color to "black" and "white" values, linearly spreading out the colors, and level values on a channel by channel bases, as per LevelImage(). The given colors allows you to specify different level ranges for each of the color channels separately.

If the boolean 'invert' is set true the image values will modifyed in the reverse direction. That is any existing "black" and "white" colors in the image will become the color values given, with all other values compressed appropriatally. This effectivally maps a greyscale gradient into the given color gradient.

The format of the LevelImageColors method is:

    MagickBooleanType LevelImageColors(Image *image,
const PixelInfo *black_color,const PixelInfo *white_color,
const MagickBooleanType invert,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
black_color
The color to map black to/from
white_point
The color to map white to/from
invert
if true map the colors (levelize), rather than from (level)
exception
return any errors or warnings in this structure.

LinearStretchImage

LinearStretchImage() discards any pixels below the black point and above the white point and levels the remaining pixels.

The format of the LinearStretchImage method is:

MagickBooleanType LinearStretchImage(Image *image,
  const double black_point,const double white_point,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
black_point
the black point.
white_point
the white point.
exception
return any errors or warnings in this structure.

ModulateImage

ModulateImage() lets you control the brightness, saturation, and hue of an image. Modulate represents the brightness, saturation, and hue as one parameter (e.g. 90,150,100). If the image colorspace is HSL, the modulation is lightness, saturation, and hue. For HWB, use blackness, whiteness, and hue. And for HCL, use chrome, luma, and hue.

The format of the ModulateImage method is:

MagickBooleanType ModulateImage(Image *image,const char *modulate,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
modulate
Define the percent change in brightness, saturation, and hue.
exception
return any errors or warnings in this structure.

NegateImage

NegateImage() negates the colors in the reference image. The grayscale option means that only grayscale values within the image are negated.

The format of the NegateImage method is:

MagickBooleanType NegateImage(Image *image,
  const MagickBooleanType grayscale,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
grayscale
If MagickTrue, only negate grayscale pixels within the image.
exception
return any errors or warnings in this structure.

The NormalizeImage

The NormalizeImage() method enhances the contrast of a color image by mapping the darkest 2 percent of all pixel to black and the brightest 1 percent to white.

The format of the NormalizeImage method is:

MagickBooleanType NormalizeImage(Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

SigmoidalContrastImage

SigmoidalContrastImage() adjusts the contrast of an image with a non-linear sigmoidal contrast algorithm. Increase the contrast of the image using a sigmoidal transfer function without saturating highlights or shadows. Contrast indicates how much to increase the contrast (0 is none; 3 is typical; 20 is pushing it); mid-point indicates where midtones fall in the resultant image (0 is white; 50 is middle-gray; 100 is black). Set sharpen to MagickTrue to increase the image contrast otherwise the contrast is reduced.

The format of the SigmoidalContrastImage method is:

MagickBooleanType SigmoidalContrastImage(Image *image,
  const MagickBooleanType sharpen,const char *levels,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
sharpen
Increase or decrease image contrast.
contrast
strength of the contrast, the larger the number the more 'threshold-like' it becomes.
midpoint
midpoint of the function as a color value 0 to QuantumRange.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Image Features

CannyEdgeImageGetImageFeaturesUse HoughLineImageMeanShiftImage

CannyEdgeImage

CannyEdgeImage() uses a multi-stage algorithm to detect a wide range of edges in images.

The format of the CannyEdgeImage method is:

Image *CannyEdgeImage(const Image *image,const double radius,
  const double sigma,const double lower_percent,
  const double upper_percent,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the gaussian smoothing filter.
sigma
the sigma of the gaussian smoothing filter.
lower_precent
percentage of edge pixels in the lower threshold.
upper_percent
percentage of edge pixels in the upper threshold.
exception
return any errors or warnings in this structure.

GetImageFeatures

GetImageFeatures() returns features for each channel in the image in each of four directions (horizontal, vertical, left and right diagonals) for the specified distance. The features include the angular second moment, contrast, correlation, sum of squares: variance, inverse difference moment, sum average, sum varience, sum entropy, entropy, difference variance, difference entropy, information measures of correlation 1, information measures of correlation 2, and maximum correlation coefficient. You can access the red channel contrast, for example, like this:

channel_features=GetImageFeatures(image,1,exception);
contrast=channel_features[RedPixelChannel].contrast[0];

Use MagickRelinquishMemory() to free the features buffer.

The format of the GetImageFeatures method is:

ChannelFeatures *GetImageFeatures(const Image *image,
  const size_t distance,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
distance
the distance.
exception
return any errors or warnings in this structure.

Use HoughLineImage

Use HoughLineImage() in conjunction with any binary edge extracted image (we recommand Canny) to identify lines in the image. The algorithm accumulates counts for every white pixel for every possible orientation (for angles from 0 to 179 in 1 degree increments) and distance from the center of the image to the corner (in 1 px increments) and stores the counts in an accumulator matrix of angle vs distance. The size of the accumulator is 180x(diagonal/2). Next it searches this space for peaks in counts and converts the locations of the peaks to slope and intercept in the normal x,y input image space. Use the slope/intercepts to find the endpoints clipped to the bounds of the image. The lines are then drawn. The counts are a measure of the length of the lines

The format of the HoughLineImage method is:

Image *HoughLineImage(const Image *image,const size_t width,
  const size_t height,const size_t threshold,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
width, height
find line pairs as local maxima in this neighborhood.
threshold
the line count threshold.
exception
return any errors or warnings in this structure.

MeanShiftImage

MeanShiftImage() delineate arbitrarily shaped clusters in the image. For each pixel, it visits all the pixels in the neighborhood specified by the window centered at the pixel and excludes those that are outside the radius=(window-1)/2 surrounding the pixel. From those pixels, it finds those that are within the specified color distance from the current mean, and computes a new x,y centroid from those coordinates and a new mean. This new x,y centroid is used as the center for a new window. This process iterates until it converges and the final mean is replaces the (original window center) pixel value. It repeats this process for the next pixel, etc., until it processes all pixels in the image. Results are typically better with colorspaces other than sRGB. We recommend YIQ, YUV or YCbCr.

The format of the MeanShiftImage method is:

Image *MeanShiftImage(const Image *image,const size_t width,
  const size_t height,const double color_distance,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
width, height
find pixels in this neighborhood.
color_distance
the color distance.
exception
return any errors or warnings in this structure.
ImageMagick: MagickWand, C API for ImageMagick: Property Methods

MagickDeleteImageArtifactMagickDeleteImagePropertyMagickDeleteOptionMagickGetAntialiasMagickGetBackgroundColorMagickGetColorspaceMagickGetCompressionMagickGetCompressionQualityMagickGetCopyrightMagickGetFilenameMagickGetFontMagickGetFormatMagickGetGravityMagickGetHomeURLMagickGetImageArtifactMagickGetImageArtifactsMagickGetImageProfileMagickGetImageProfilesMagickGetImagePropertyMagickGetImagePropertiesMagickGetInterlaceSchemeMagickGetInterpolateMethodMagickGetOptionMagickGetOptionsMagickGetOrientationMagickGetPackageNameMagickGetPageMagickGetPointsizeMagickGetQuantumDepthMagickGetQuantumRangeMagickGetReleaseDateMagickGetResolutionMagickGetResourceMagickGetResourceLimitMagickGetSamplingFactorsMagickGetSizeMagickGetSizeOffsetMagickGetTypeMagickGetVersionMagickProfileImageMagickRemoveImageProfileMagickSetAntialiasMagickSetBackgroundColorMagickSetColorspaceMagickSetCompressionMagickSetCompressionQualityMagickSetDepthMagickSetExtractMagickSetFilenameMagickSetFontMagickSetFormatMagickSetGravityMagickSetImageArtifactMagickSetImageProfileMagickSetImagePropertyMagickSetInterlaceSchemeMagickSetInterpolateMethodMagickSetOptionMagickSetOrientationMagickSetPageMagickSetPassphraseMagickSetPointsizeMagickSetProgressMonitorMagickSetResourceLimitMagickSetResolutionMagickSetSamplingFactorsMagickSetSizeMagickSetSizeOffsetMagickSetType

MagickDeleteImageArtifact

MagickDeleteImageArtifact() deletes a wand artifact.

The format of the MagickDeleteImageArtifact method is:

MagickBooleanType MagickDeleteImageArtifact(MagickWand *wand,
  const char *artifact)

A description of each parameter follows:

image
the image.
artifact
the image artifact.

MagickDeleteImageProperty

MagickDeleteImageProperty() deletes a wand property.

The format of the MagickDeleteImageProperty method is:

MagickBooleanType MagickDeleteImageProperty(MagickWand *wand,
  const char *property)

A description of each parameter follows:

image
the image.
property
the image property.

MagickDeleteOption

MagickDeleteOption() deletes a wand option.

The format of the MagickDeleteOption method is:

MagickBooleanType MagickDeleteOption(MagickWand *wand,
  const char *option)

A description of each parameter follows:

image
the image.
option
the image option.

MagickGetAntialias

MagickGetAntialias() returns the antialias property associated with the wand.

The format of the MagickGetAntialias method is:

MagickBooleanType MagickGetAntialias(const MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetBackgroundColor

MagickGetBackgroundColor() returns the wand background color.

The format of the MagickGetBackgroundColor method is:

PixelWand *MagickGetBackgroundColor(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetColorspace

MagickGetColorspace() gets the wand colorspace type.

The format of the MagickGetColorspace method is:

ColorspaceType MagickGetColorspace(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetCompression

MagickGetCompression() gets the wand compression type.

The format of the MagickGetCompression method is:

CompressionType MagickGetCompression(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetCompressionQuality

MagickGetCompressionQuality() gets the wand compression quality.

The format of the MagickGetCompressionQuality method is:

size_t MagickGetCompressionQuality(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetCopyright

MagickGetCopyright() returns the ImageMagick API copyright as a string constant.

The format of the MagickGetCopyright method is:

const char *MagickGetCopyright(void)

MagickGetFilename

MagickGetFilename() returns the filename associated with an image sequence.

The format of the MagickGetFilename method is:

const char *MagickGetFilename(const MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetFont

MagickGetFont() returns the font associated with the MagickWand.

The format of the MagickGetFont method is:

char *MagickGetFont(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetFormat

MagickGetFormat() returns the format of the magick wand.

The format of the MagickGetFormat method is:

const char MagickGetFormat(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetGravity

MagickGetGravity() gets the wand gravity.

The format of the MagickGetGravity method is:

GravityType MagickGetGravity(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetHomeURL

MagickGetHomeURL() returns the ImageMagick home URL.

The format of the MagickGetHomeURL method is:

char *MagickGetHomeURL(void)

MagickGetImageArtifact

MagickGetImageArtifact() returns a value associated with the specified artifact. Use MagickRelinquishMemory() to free the value when you are finished with it.

The format of the MagickGetImageArtifact method is:

char *MagickGetImageArtifact(MagickWand *wand,const char *artifact)

A description of each parameter follows:

wand
the magick wand.
artifact
the artifact.

MagickGetImageArtifacts

MagickGetImageArtifacts() returns all the artifact names that match the specified pattern associated with a wand. Use MagickGetImageProperty() to return the value of a particular artifact. Use MagickRelinquishMemory() to free the value when you are finished with it.

The format of the MagickGetImageArtifacts method is:

char *MagickGetImageArtifacts(MagickWand *wand,
  const char *pattern,size_t *number_artifacts)

A description of each parameter follows:

wand
the magick wand.
pattern
Specifies a pointer to a text string containing a pattern.
number_artifacts
the number artifacts associated with this wand.

MagickGetImageProfile

MagickGetImageProfile() returns the named image profile.

The format of the MagickGetImageProfile method is:

unsigned char *MagickGetImageProfile(MagickWand *wand,const char *name,
  size_t *length)

A description of each parameter follows:

wand
the magick wand.
name
Name of profile to return: ICC, IPTC, or generic profile.
length
the length of the profile.

MagickGetImageProfiles

MagickGetImageProfiles() returns all the profile names that match the specified pattern associated with a wand. Use MagickGetImageProfile() to return the value of a particular property. Use MagickRelinquishMemory() to free the value when you are finished with it.

The format of the MagickGetImageProfiles method is:

char *MagickGetImageProfiles(MagickWand *wand,const char *pattern,
  size_t *number_profiles)

A description of each parameter follows:

wand
the magick wand.
pattern
Specifies a pointer to a text string containing a pattern.
number_profiles
the number profiles associated with this wand.

MagickGetImageProperty

MagickGetImageProperty() returns a value associated with the specified property. Use MagickRelinquishMemory() to free the value when you are finished with it.

The format of the MagickGetImageProperty method is:

char *MagickGetImageProperty(MagickWand *wand,const char *property)

A description of each parameter follows:

wand
the magick wand.
property
the property.

MagickGetImageProperties

MagickGetImageProperties() returns all the property names that match the specified pattern associated with a wand. Use MagickGetImageProperty() to return the value of a particular property. Use MagickRelinquishMemory() to free the value when you are finished with it.

The format of the MagickGetImageProperties method is:

char *MagickGetImageProperties(MagickWand *wand,
  const char *pattern,size_t *number_properties)

A description of each parameter follows:

wand
the magick wand.
pattern
Specifies a pointer to a text string containing a pattern.
number_properties
the number properties associated with this wand.

MagickGetInterlaceScheme

MagickGetInterlaceScheme() gets the wand interlace scheme.

The format of the MagickGetInterlaceScheme method is:

InterlaceType MagickGetInterlaceScheme(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetInterpolateMethod

MagickGetInterpolateMethod() gets the wand compression.

The format of the MagickGetInterpolateMethod method is:

PixelInterpolateMethod MagickGetInterpolateMethod(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetOption

MagickGetOption() returns a value associated with a wand and the specified key. Use MagickRelinquishMemory() to free the value when you are finished with it.

The format of the MagickGetOption method is:

char *MagickGetOption(MagickWand *wand,const char *key)

A description of each parameter follows:

wand
the magick wand.
key
the key.

MagickGetOptions

MagickGetOptions() returns all the option names that match the specified pattern associated with a wand. Use MagickGetOption() to return the value of a particular option. Use MagickRelinquishMemory() to free the value when you are finished with it.

The format of the MagickGetOptions method is:

char *MagickGetOptions(MagickWand *wand,const char *pattern,
  size_t *number_options)

A description of each parameter follows:

wand
the magick wand.
pattern
Specifies a pointer to a text string containing a pattern.
number_options
the number options associated with this wand.

MagickGetOrientation

MagickGetOrientation() gets the wand orientation type.

The format of the MagickGetOrientation method is:

OrientationType MagickGetOrientation(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetPackageName

MagickGetPackageName() returns the ImageMagick package name as a string constant.

The format of the MagickGetPackageName method is:

const char *MagickGetPackageName(void)

MagickGetPage

MagickGetPage() returns the page geometry associated with the magick wand.

The format of the MagickGetPage method is:

MagickBooleanType MagickGetPage(const MagickWand *wand,
  size_t *width,size_t *height,ssize_t *x,ssize_t *y)

A description of each parameter follows:

wand
the magick wand.
width
the page width.
height
page height.
x
the page x-offset.
y
the page y-offset.

MagickGetPointsize

MagickGetPointsize() returns the font pointsize associated with the MagickWand.

The format of the MagickGetPointsize method is:

double MagickGetPointsize(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetQuantumDepth

MagickGetQuantumDepth() returns the ImageMagick quantum depth as a string constant.

The format of the MagickGetQuantumDepth method is:

const char *MagickGetQuantumDepth(size_t *depth)

A description of each parameter follows:

depth
the quantum depth is returned as a number.

MagickGetQuantumRange

MagickGetQuantumRange() returns the ImageMagick quantum range as a string constant.

The format of the MagickGetQuantumRange method is:

const char *MagickGetQuantumRange(size_t *range)

A description of each parameter follows:

range
the quantum range is returned as a number.

MagickGetReleaseDate

MagickGetReleaseDate() returns the ImageMagick release date as a string constant.

The format of the MagickGetReleaseDate method is:

const char *MagickGetReleaseDate(void)

MagickGetResolution

MagickGetResolution() gets the image X and Y resolution.

The format of the MagickGetResolution method is:

MagickBooleanType MagickGetResolution(const MagickWand *wand,double *x,
  double *y)

A description of each parameter follows:

wand
the magick wand.
x
the x-resolution.
y
the y-resolution.

MagickGetResource

MagickGetResource() returns the specified resource in megabytes.

The format of the MagickGetResource method is:

MagickSizeType MagickGetResource(const ResourceType type)

A description of each parameter follows:

wand
the magick wand.

MagickGetResourceLimit

MagickGetResourceLimit() returns the specified resource limit in megabytes.

The format of the MagickGetResourceLimit method is:

MagickSizeType MagickGetResourceLimit(const ResourceType type)

A description of each parameter follows:

wand
the magick wand.

MagickGetSamplingFactors

MagickGetSamplingFactors() gets the horizontal and vertical sampling factor.

The format of the MagickGetSamplingFactors method is:

double *MagickGetSamplingFactor(MagickWand *wand,
  size_t *number_factors)

A description of each parameter follows:

wand
the magick wand.
number_factors
the number of factors in the returned array.

MagickGetSize

MagickGetSize() returns the size associated with the magick wand.

The format of the MagickGetSize method is:

MagickBooleanType MagickGetSize(const MagickWand *wand,
  size_t *columns,size_t *rows)

A description of each parameter follows:

wand
the magick wand.
columns
the width in pixels.
height
the height in pixels.

MagickGetSizeOffset

MagickGetSizeOffset() returns the size offset associated with the magick wand.

The format of the MagickGetSizeOffset method is:

MagickBooleanType MagickGetSizeOffset(const MagickWand *wand,
  ssize_t *offset)

A description of each parameter follows:

wand
the magick wand.
offset
the image offset.

MagickGetType

MagickGetType() returns the wand type.

The format of the MagickGetType method is:

ImageType MagickGetType(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetVersion

MagickGetVersion() returns the ImageMagick API version as a string constant and as a number.

The format of the MagickGetVersion method is:

const char *MagickGetVersion(size_t *version)

A description of each parameter follows:

version
the ImageMagick version is returned as a number.

MagickProfileImage

MagickProfileImage() adds or removes a ICC, IPTC, or generic profile from an image. If the profile is NULL, it is removed from the image otherwise added. Use a name of '*' and a profile of NULL to remove all profiles from the image.

The format of the MagickProfileImage method is:

MagickBooleanType MagickProfileImage(MagickWand *wand,const char *name,
  const void *profile,const size_t length)

A description of each parameter follows:

wand
the magick wand.
name
Name of profile to add or remove: ICC, IPTC, or generic profile.
profile
the profile.
length
the length of the profile.

MagickRemoveImageProfile

MagickRemoveImageProfile() removes the named image profile and returns it.

The format of the MagickRemoveImageProfile method is:

unsigned char *MagickRemoveImageProfile(MagickWand *wand,
  const char *name,size_t *length)

A description of each parameter follows:

wand
the magick wand.
name
Name of profile to return: ICC, IPTC, or generic profile.
length
the length of the profile.

MagickSetAntialias

MagickSetAntialias() sets the antialias propery of the wand.

The format of the MagickSetAntialias method is:

MagickBooleanType MagickSetAntialias(MagickWand *wand,
  const MagickBooleanType antialias)

A description of each parameter follows:

wand
the magick wand.
antialias
the antialias property.

MagickSetBackgroundColor

MagickSetBackgroundColor() sets the wand background color.

The format of the MagickSetBackgroundColor method is:

MagickBooleanType MagickSetBackgroundColor(MagickWand *wand,
  const PixelWand *background)

A description of each parameter follows:

wand
the magick wand.
background
the background pixel wand.

MagickSetColorspace

MagickSetColorspace() sets the wand colorspace type.

The format of the MagickSetColorspace method is:

MagickBooleanType MagickSetColorspace(MagickWand *wand,
  const ColorspaceType colorspace)

A description of each parameter follows:

wand
the magick wand.
colorspace
the wand colorspace.

MagickSetCompression

MagickSetCompression() sets the wand compression type.

The format of the MagickSetCompression method is:

MagickBooleanType MagickSetCompression(MagickWand *wand,
  const CompressionType compression)

A description of each parameter follows:

wand
the magick wand.
compression
the wand compression.

MagickSetCompressionQuality

MagickSetCompressionQuality() sets the wand compression quality.

The format of the MagickSetCompressionQuality method is:

MagickBooleanType MagickSetCompressionQuality(MagickWand *wand,
  const size_t quality)

A description of each parameter follows:

wand
the magick wand.
quality
the wand compression quality.

MagickSetDepth

MagickSetDepth() sets the wand pixel depth.

The format of the MagickSetDepth method is:

MagickBooleanType MagickSetDepth(MagickWand *wand,
  const size_t depth)

A description of each parameter follows:

wand
the magick wand.
depth
the wand pixel depth.

MagickSetExtract

MagickSetExtract() sets the extract geometry before you read or write an image file. Use it for inline cropping (e.g. 200x200+0+0) or resizing (e.g.200x200).

The format of the MagickSetExtract method is:

MagickBooleanType MagickSetExtract(MagickWand *wand,
  const char *geometry)

A description of each parameter follows:

wand
the magick wand.
geometry
the extract geometry.

MagickSetFilename

MagickSetFilename() sets the filename before you read or write an image file.

The format of the MagickSetFilename method is:

MagickBooleanType MagickSetFilename(MagickWand *wand,
  const char *filename)

A description of each parameter follows:

wand
the magick wand.
filename
the image filename.

MagickSetFont

MagickSetFont() sets the font associated with the MagickWand.

The format of the MagickSetFont method is:

MagickBooleanType MagickSetFont(MagickWand *wand, const char *font)

A description of each parameter follows:

wand
the magick wand.
font
the font

MagickSetFormat

MagickSetFormat() sets the format of the magick wand.

The format of the MagickSetFormat method is:

MagickBooleanType MagickSetFormat(MagickWand *wand,const char *format)

A description of each parameter follows:

wand
the magick wand.
format
the image format.

MagickSetGravity

MagickSetGravity() sets the gravity type.

The format of the MagickSetGravity type is:

MagickBooleanType MagickSetGravity(MagickWand *wand,
  const GravityType type)

A description of each parameter follows:

wand
the magick wand.
type
the gravity type.

MagickSetImageArtifact

MagickSetImageArtifact() associates a artifact with an image.

The format of the MagickSetImageArtifact method is:

MagickBooleanType MagickSetImageArtifact(MagickWand *wand,
  const char *artifact,const char *value)

A description of each parameter follows:

wand
the magick wand.
artifact
the artifact.
value
the value.

MagickSetImageProfile

MagickSetImageProfile() adds a named profile to the magick wand. If a profile with the same name already exists, it is replaced. This method differs from the MagickProfileImage() method in that it does not apply any CMS color profiles.

The format of the MagickSetImageProfile method is:

MagickBooleanType MagickSetImageProfile(MagickWand *wand,
  const char *name,const void *profile,const size_t length)

A description of each parameter follows:

wand
the magick wand.
name
Name of profile to add or remove: ICC, IPTC, or generic profile.
profile
the profile.
length
the length of the profile.

MagickSetImageProperty

MagickSetImageProperty() associates a property with an image.

The format of the MagickSetImageProperty method is:

MagickBooleanType MagickSetImageProperty(MagickWand *wand,
  const char *property,const char *value)

A description of each parameter follows:

wand
the magick wand.
property
the property.
value
the value.

MagickSetInterlaceScheme

MagickSetInterlaceScheme() sets the image compression.

The format of the MagickSetInterlaceScheme method is:

MagickBooleanType MagickSetInterlaceScheme(MagickWand *wand,
  const InterlaceType interlace_scheme)

A description of each parameter follows:

wand
the magick wand.
interlace_scheme
the image interlace scheme: NoInterlace, LineInterlace, PlaneInterlace, PartitionInterlace.

MagickSetInterpolateMethod

MagickSetInterpolateMethod() sets the interpolate pixel method.

The format of the MagickSetInterpolateMethod method is:

MagickBooleanType MagickSetInterpolateMethod(MagickWand *wand,
  const InterpolateMethodPixel method)

A description of each parameter follows:

wand
the magick wand.
method
the interpolate pixel method.

MagickSetOption

MagickSetOption() associates one or options with the wand (.e.g MagickSetOption(wand,"jpeg:perserve","yes")).

The format of the MagickSetOption method is:

MagickBooleanType MagickSetOption(MagickWand *wand,const char *key,
  const char *value)

A description of each parameter follows:

wand
the magick wand.
key
The key.
value
The value.

MagickSetOrientation

MagickSetOrientation() sets the wand orientation type.

The format of the MagickSetOrientation method is:

MagickBooleanType MagickSetOrientation(MagickWand *wand,
  const OrientationType orientation)

A description of each parameter follows:

wand
the magick wand.
orientation
the wand orientation.

MagickSetPage

MagickSetPage() sets the page geometry of the magick wand.

The format of the MagickSetPage method is:

MagickBooleanType MagickSetPage(MagickWand *wand,
  const size_t width,const size_t height,const ssize_t x,
  const ssize_t y)

A description of each parameter follows:

wand
the magick wand.
width
the page width.
height
the page height.
x
the page x-offset.
y
the page y-offset.

MagickSetPassphrase

MagickSetPassphrase() sets the passphrase.

The format of the MagickSetPassphrase method is:

MagickBooleanType MagickSetPassphrase(MagickWand *wand,
  const char *passphrase)

A description of each parameter follows:

wand
the magick wand.
passphrase
the passphrase.

MagickSetPointsize

MagickSetPointsize() sets the font pointsize associated with the MagickWand.

The format of the MagickSetPointsize method is:

MagickBooleanType MagickSetPointsize(MagickWand *wand,
  const double pointsize)

A description of each parameter follows:

wand
the magick wand.
pointsize
the size of the font

MagickSetProgressMonitor

MagickSetProgressMonitor() sets the wand progress monitor to the specified method and returns the previous progress monitor if any. The progress monitor method looks like this:

    MagickBooleanType MagickProgressMonitor(const char *text,
const MagickOffsetType offset,const MagickSizeType span,
void *client_data)

If the progress monitor returns MagickFalse, the current operation is interrupted.

The format of the MagickSetProgressMonitor method is:

MagickProgressMonitor MagickSetProgressMonitor(MagickWand *wand
  const MagickProgressMonitor progress_monitor,void *client_data)

A description of each parameter follows:

wand
the magick wand.
progress_monitor
Specifies a pointer to a method to monitor progress of an image operation.
client_data
Specifies a pointer to any client data.

MagickSetResourceLimit

MagickSetResourceLimit() sets the limit for a particular resource in megabytes.

The format of the MagickSetResourceLimit method is:

MagickBooleanType MagickSetResourceLimit(const ResourceType type,
  const MagickSizeType limit)

A description of each parameter follows:

type
the type of resource: AreaResource, MemoryResource, MapResource, DiskResource, FileResource.
o The maximum limit for the resource.

MagickSetResolution

MagickSetResolution() sets the image resolution.

The format of the MagickSetResolution method is:

MagickBooleanType MagickSetResolution(MagickWand *wand,
  const double x_resolution,const double y_resolution)

A description of each parameter follows:

wand
the magick wand.
x_resolution
the image x resolution.
y_resolution
the image y resolution.

MagickSetSamplingFactors

MagickSetSamplingFactors() sets the image sampling factors.

The format of the MagickSetSamplingFactors method is:

MagickBooleanType MagickSetSamplingFactors(MagickWand *wand,
  const size_t number_factors,const double *sampling_factors)

A description of each parameter follows:

wand
the magick wand.
number_factoes
the number of factors.
sampling_factors
An array of doubles representing the sampling factor for each color component (in RGB order).

MagickSetSize

MagickSetSize() sets the size of the magick wand. Set it before you read a raw image format such as RGB, GRAY, or CMYK.

The format of the MagickSetSize method is:

MagickBooleanType MagickSetSize(MagickWand *wand,
  const size_t columns,const size_t rows)

A description of each parameter follows:

wand
the magick wand.
columns
the width in pixels.
rows
the rows in pixels.

MagickSetSizeOffset

MagickSetSizeOffset() sets the size and offset of the magick wand. Set it before you read a raw image format such as RGB, GRAY, or CMYK.

The format of the MagickSetSizeOffset method is:

MagickBooleanType MagickSetSizeOffset(MagickWand *wand,
  const size_t columns,const size_t rows,
  const ssize_t offset)

A description of each parameter follows:

wand
the magick wand.
columns
the image width in pixels.
rows
the image rows in pixels.
offset
the image offset.

MagickSetType

MagickSetType() sets the image type attribute.

The format of the MagickSetType method is:

MagickBooleanType MagickSetType(MagickWand *wand,
  const ImageType image_type)

A description of each parameter follows:

wand
the magick wand.
image_type
the image type: UndefinedType, BilevelType, GrayscaleType, GrayscaleAlphaType, PaletteType, PaletteAlphaType, TrueColorType, TrueColorAlphaType, ColorSeparationType, ColorSeparationAlphaType, or OptimizeType.
ImageMagick: MagickWand, C API for ImageMagick: Deprecated Methods

ImageMagick: MagickCore, C API for ImageMagick: Add a Special Effect

AddNoiseImageBlueShiftImageCharcoalImageColorizeImageColorMatrixImageFxImageImplodeImageThe MorphImagesPlasmaImagePolaroidImageMagickSepiaToneImageShadowImageSketchImageSolarizeImageSteganoImageStereoAnaglyphImageSwirlImageTintImageVignetteImageWaveImage

AddNoiseImage

AddNoiseImage() adds random noise to the image.

The format of the AddNoiseImage method is:

Image *AddNoiseImage(const Image *image,const NoiseType noise_type,
  const double attenuate,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
channel
the channel type.
noise_type
The type of noise: Uniform, Gaussian, Multiplicative, Impulse, Laplacian, or Poisson.
attenuate
attenuate the random distribution.
exception
return any errors or warnings in this structure.

BlueShiftImage

BlueShiftImage() mutes the colors of the image to simulate a scene at nighttime in the moonlight.

The format of the BlueShiftImage method is:

Image *BlueShiftImage(const Image *image,const double factor,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
factor
the shift factor.
exception
return any errors or warnings in this structure.

CharcoalImage

CharcoalImage() creates a new image that is a copy of an existing one with the edge highlighted. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

The format of the CharcoalImage method is:

Image *CharcoalImage(const Image *image,const double radius,
  const double sigma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the pixel neighborhood.
sigma
the standard deviation of the Gaussian, in pixels.
exception
return any errors or warnings in this structure.

ColorizeImage

ColorizeImage() blends the fill color with each pixel in the image. A percentage blend is specified with opacity. Control the application of different color components by specifying a different percentage for each component (e.g. 90/100/10 is 90 red, 100 green, and 10 blue).

The format of the ColorizeImage method is:

Image *ColorizeImage(const Image *image,const char *blend,
  const PixelInfo *colorize,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
blend
A character string indicating the level of blending as a percentage.
colorize
A color value.
exception
return any errors or warnings in this structure.

ColorMatrixImage

ColorMatrixImage() applies color transformation to an image. This method permits saturation changes, hue rotation, luminance to alpha, and various other effects. Although variable-sized transformation matrices can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA (or RGBA with offsets). The matrix is similar to those used by Adobe Flash except offsets are in column 6 rather than 5 (in support of CMYKA images) and offsets are normalized (divide Flash offset by 255).

The format of the ColorMatrixImage method is:

Image *ColorMatrixImage(const Image *image,
  const KernelInfo *color_matrix,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
color_matrix
the color matrix.
exception
return any errors or warnings in this structure.

FxImage

FxImage() applies a mathematical expression to the specified image.

The format of the FxImage method is:

Image *FxImage(const Image *image,const char *expression,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
expression
A mathematical expression.
exception
return any errors or warnings in this structure.

ImplodeImage

ImplodeImage() creates a new image that is a copy of an existing one with the image pixels "implode" by the specified percentage. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

The format of the ImplodeImage method is:

Image *ImplodeImage(const Image *image,const double amount,
  const PixelInterpolateMethod method,ExceptionInfo *exception)

A description of each parameter follows:

implode_image
Method ImplodeImage returns a pointer to the image after it is implode. A null image is returned if there is a memory shortage.
image
the image.
amount
Define the extent of the implosion.
method
the pixel interpolation method.
exception
return any errors or warnings in this structure.

The MorphImages

The MorphImages() method requires a minimum of two images. The first image is transformed into the second by a number of intervening images as specified by frames.

The format of the MorphImage method is:

Image *MorphImages(const Image *image,const size_t number_frames,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
number_frames
Define the number of in-between image to generate. The more in-between frames, the smoother the morph.
exception
return any errors or warnings in this structure.

PlasmaImage

PlasmaImage() initializes an image with plasma fractal values. The image must be initialized with a base color and the random number generator seeded before this method is called.

The format of the PlasmaImage method is:

MagickBooleanType PlasmaImage(Image *image,const SegmentInfo *segment,
  size_t attenuate,size_t depth,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
segment
Define the region to apply plasma fractals values.
attenuate
Define the plasma attenuation factor.
depth
Limit the plasma recursion depth.
exception
return any errors or warnings in this structure.

PolaroidImage

PolaroidImage() simulates a Polaroid picture.

The format of the PolaroidImage method is:

Image *PolaroidImage(const Image *image,const DrawInfo *draw_info,
  const char *caption,const double angle,
  const PixelInterpolateMethod method,ExceptionInfo exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
caption
the Polaroid caption.
angle
Apply the effect along this angle.
method
the pixel interpolation method.
exception
return any errors or warnings in this structure.

MagickSepiaToneImage

MagickSepiaToneImage() applies a special effect to the image, similar to the effect achieved in a photo darkroom by sepia toning. Threshold ranges from 0 to QuantumRange and is a measure of the extent of the sepia toning. A threshold of 80 is a good starting point for a reasonable tone.

The format of the SepiaToneImage method is:

Image *SepiaToneImage(const Image *image,const double threshold,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
threshold
the tone threshold.
exception
return any errors or warnings in this structure.

ShadowImage

ShadowImage() simulates a shadow from the specified image and returns it.

The format of the ShadowImage method is:

Image *ShadowImage(const Image *image,const double alpha,
  const double sigma,const ssize_t x_offset,const ssize_t y_offset,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
alpha
percentage transparency.
sigma
the standard deviation of the Gaussian, in pixels.
x_offset
the shadow x-offset.
y_offset
the shadow y-offset.
exception
return any errors or warnings in this structure.

SketchImage

SketchImage() simulates a pencil sketch. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and SketchImage() selects a suitable radius for you. Angle gives the angle of the sketch.

The format of the SketchImage method is:

    Image *SketchImage(const Image *image,const double radius,
const double sigma,const double angle,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.
angle
apply the effect along this angle.
exception
return any errors or warnings in this structure.

SolarizeImage

SolarizeImage() applies a special effect to the image, similar to the effect achieved in a photo darkroom by selectively exposing areas of photo sensitive paper to light. Threshold ranges from 0 to QuantumRange and is a measure of the extent of the solarization.

The format of the SolarizeImage method is:

MagickBooleanType SolarizeImage(Image *image,const double threshold,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
threshold
Define the extent of the solarization.
exception
return any errors or warnings in this structure.

SteganoImage

SteganoImage() hides a digital watermark within the image. Recover the hidden watermark later to prove that the authenticity of an image. Offset defines the start position within the image to hide the watermark.

The format of the SteganoImage method is:

Image *SteganoImage(const Image *image,Image *watermark,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
watermark
the watermark image.
exception
return any errors or warnings in this structure.

StereoAnaglyphImage

StereoAnaglyphImage() combines two images and produces a single image that is the composite of a left and right image of a stereo pair. Special red-green stereo glasses are required to view this effect.

The format of the StereoAnaglyphImage method is:

Image *StereoImage(const Image *left_image,const Image *right_image,
  ExceptionInfo *exception)
Image *StereoAnaglyphImage(const Image *left_image,
  const Image *right_image,const ssize_t x_offset,const ssize_t y_offset,
  ExceptionInfo *exception)

A description of each parameter follows:

left_image
the left image.
right_image
the right image.
exception
return any errors or warnings in this structure.
x_offset
amount, in pixels, by which the left image is offset to the right of the right image.
y_offset
amount, in pixels, by which the left image is offset to the bottom of the right image.

SwirlImage

SwirlImage() swirls the pixels about the center of the image, where degrees indicates the sweep of the arc through which each pixel is moved. You get a more dramatic effect as the degrees move from 1 to 360.

The format of the SwirlImage method is:

Image *SwirlImage(const Image *image,double degrees,
  const PixelInterpolateMethod method,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
degrees
Define the tightness of the swirling effect.
method
the pixel interpolation method.
exception
return any errors or warnings in this structure.

TintImage

TintImage() applies a color vector to each pixel in the image. The length of the vector is 0 for black and white and at its maximum for the midtones. The vector weighting function is f(x)=(1-(4.0*((x-0.5)*(x-0.5))))

The format of the TintImage method is:

Image *TintImage(const Image *image,const char *blend,
  const PixelInfo *tint,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
blend
A color value used for tinting.
tint
A color value used for tinting.
exception
return any errors or warnings in this structure.

VignetteImage

VignetteImage() softens the edges of the image in vignette style.

The format of the VignetteImage method is:

Image *VignetteImage(const Image *image,const double radius,
  const double sigma,const ssize_t x,const ssize_t y,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the pixel neighborhood.
sigma
the standard deviation of the Gaussian, in pixels.
x, y
Define the x and y ellipse offset.
exception
return any errors or warnings in this structure.

WaveImage

WaveImage() creates a "ripple" effect in the image by shifting the pixels vertically along a sine wave whose amplitude and wavelength is specified by the given parameters.

The format of the WaveImage method is:

Image *WaveImage(const Image *image,const double amplitude,
  const double wave_length,const PixelInterpolateMethod method,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
amplitude, wave_length
Define the amplitude and wave length of the sine wave.
interpolate
the pixel interpolation method.
exception
return any errors or warnings in this structure.
ImageMagick: MagickWand, C API for ImageMagick: Pixel Wand Methods

ClearPixelWandClonePixelWandClonePixelWandsDestroyPixelWandDestroyPixelWandsIsPixelWandSimilarIsPixelWandNewPixelWandNewPixelWandsPixelClearExceptionPixelGetAlphaPixelGetAlphaQuantumPixelGetBlackPixelGetBlackQuantumPixelGetBluePixelGetBlueQuantumPixelGetColorAsStringPixelGetColorAsNormalizedStringPixelGetColorCountPixelGetCyanPixelGetCyanQuantumPixelGetExceptionPixelGetExceptionTypePixelGetFuzzPixelGetGreenPixelGetGreenQuantumPixelGetHSLPixelGetIndexPixelGetMagentaPixelGetMagentaQuantumPixelGetMagickColorPixelGetPixelPixelGetQuantumPacketPixelGetQuantumPixelPixelGetRedPixelGetRedQuantumPixelGetYellowPixelGetYellowQuantumPixelSetAlphaPixelSetAlphaQuantumPixelSetBlackPixelSetBlackQuantumPixelSetBluePixelSetBlueQuantumPixelSetColorPixelSetColorCountPixelSetColorFromWandPixelSetCyanPixelSetCyanQuantumPixelSetFuzzPixelSetGreenPixelSetGreenQuantumPixelSetHSLPixelSetIndexPixelSetMagentaPixelSetMagentaQuantumPixelSetPixelColorPixelSetQuantumPixelPixelSetRedPixelSetRedQuantumPixelSetYellowPixelSetYellowQuantum

ClearPixelWand

ClearPixelWand() clears resources associated with the wand.

The format of the ClearPixelWand method is:

void ClearPixelWand(PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

ClonePixelWand

ClonePixelWand() makes an exact copy of the specified wand.

The format of the ClonePixelWand method is:

PixelWand *ClonePixelWand(const PixelWand *wand)

A description of each parameter follows:

wand
the magick wand.

ClonePixelWands

ClonePixelWands() makes an exact copy of the specified wands.

The format of the ClonePixelWands method is:

PixelWand **ClonePixelWands(const PixelWand **wands,
  const size_t number_wands)

A description of each parameter follows:

wands
the magick wands.
number_wands
the number of wands.

DestroyPixelWand

DestroyPixelWand() deallocates resources associated with a PixelWand.

The format of the DestroyPixelWand method is:

PixelWand *DestroyPixelWand(PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

DestroyPixelWands

DestroyPixelWands() deallocates resources associated with an array of pixel wands.

The format of the DestroyPixelWands method is:

PixelWand **DestroyPixelWands(PixelWand **wand,
  const size_t number_wands)

A description of each parameter follows:

wand
the pixel wand.
number_wands
the number of wands.

IsPixelWandSimilar

IsPixelWandSimilar() returns MagickTrue if the distance between two colors is less than the specified distance.

The format of the IsPixelWandSimilar method is:

MagickBooleanType IsPixelWandSimilar(PixelWand *p,PixelWand *q,
  const double fuzz)

A description of each parameter follows:

p
the pixel wand.
q
the pixel wand.
fuzz
any two colors that are less than or equal to this distance squared are consider similar.

IsPixelWand

IsPixelWand() returns MagickTrue if the wand is verified as a pixel wand.

The format of the IsPixelWand method is:

MagickBooleanType IsPixelWand(const PixelWand *wand)

A description of each parameter follows:

wand
the magick wand.

NewPixelWand

NewPixelWand() returns a new pixel wand.

The format of the NewPixelWand method is:

PixelWand *NewPixelWand(void)

NewPixelWands

NewPixelWands() returns an array of pixel wands.

The format of the NewPixelWands method is:

PixelWand **NewPixelWands(const size_t number_wands)

A description of each parameter follows:

number_wands
the number of wands.

PixelClearException

PixelClearException() clear any exceptions associated with the iterator.

The format of the PixelClearException method is:

MagickBooleanType PixelClearException(PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetAlpha

PixelGetAlpha() returns the normalized alpha value of the pixel wand.

The format of the PixelGetAlpha method is:

double PixelGetAlpha(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetAlphaQuantum

PixelGetAlphaQuantum() returns the alpha value of the pixel wand.

The format of the PixelGetAlphaQuantum method is:

Quantum PixelGetAlphaQuantum(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetBlack

PixelGetBlack() returns the normalized black color of the pixel wand.

The format of the PixelGetBlack method is:

double PixelGetBlack(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetBlackQuantum

PixelGetBlackQuantum() returns the black color of the pixel wand.

The format of the PixelGetBlackQuantum method is:

Quantum PixelGetBlackQuantum(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetBlue

PixelGetBlue() returns the normalized blue color of the pixel wand.

The format of the PixelGetBlue method is:

double PixelGetBlue(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetBlueQuantum

PixelGetBlueQuantum() returns the blue color of the pixel wand.

The format of the PixelGetBlueQuantum method is:

Quantum PixelGetBlueQuantum(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetColorAsString

PixelGetColorAsString() returnsd the color of the pixel wand as a string.

The format of the PixelGetColorAsString method is:

char *PixelGetColorAsString(PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetColorAsNormalizedString

PixelGetColorAsNormalizedString() returns the normalized color of the pixel wand as a string.

The format of the PixelGetColorAsNormalizedString method is:

char *PixelGetColorAsNormalizedString(PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetColorCount

PixelGetColorCount() returns the color count associated with this color.

The format of the PixelGetColorCount method is:

size_t PixelGetColorCount(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetCyan

PixelGetCyan() returns the normalized cyan color of the pixel wand.

The format of the PixelGetCyan method is:

double PixelGetCyan(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetCyanQuantum

PixelGetCyanQuantum() returns the cyan color of the pixel wand.

The format of the PixelGetCyanQuantum method is:

Quantum PixelGetCyanQuantum(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetException

PixelGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.

The format of the PixelGetException method is:

char *PixelGetException(const PixelWand *wand,ExceptionType *severity)

A description of each parameter follows:

wand
the pixel wand.
severity
the severity of the error is returned here.

PixelGetExceptionType

PixelGetExceptionType() the exception type associated with the wand. If no exception has occurred, UndefinedExceptionType is returned.

The format of the PixelGetExceptionType method is:

ExceptionType PixelGetExceptionType(const PixelWand *wand)

A description of each parameter follows:

wand
the magick wand.

PixelGetFuzz

PixelGetFuzz() returns the normalized fuzz value of the pixel wand.

The format of the PixelGetFuzz method is:

double PixelGetFuzz(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetGreen

PixelGetGreen() returns the normalized green color of the pixel wand.

The format of the PixelGetGreen method is:

double PixelGetGreen(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetGreenQuantum

PixelGetGreenQuantum() returns the green color of the pixel wand.

The format of the PixelGetGreenQuantum method is:

Quantum PixelGetGreenQuantum(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetHSL

PixelGetHSL() returns the normalized HSL color of the pixel wand.

The format of the PixelGetHSL method is:

void PixelGetHSL(const PixelWand *wand,double *hue,double *saturation,
  double *lightness)

A description of each parameter follows:

wand
the pixel wand.
hue,saturation,lightness
Return the pixel hue, saturation, and brightness.

PixelGetIndex

PixelGetIndex() returns the colormap index from the pixel wand.

The format of the PixelGetIndex method is:

Quantum PixelGetIndex(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetMagenta

PixelGetMagenta() returns the normalized magenta color of the pixel wand.

The format of the PixelGetMagenta method is:

double PixelGetMagenta(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetMagentaQuantum

PixelGetMagentaQuantum() returns the magenta color of the pixel wand.

The format of the PixelGetMagentaQuantum method is:

Quantum PixelGetMagentaQuantum(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetMagickColor

PixelGetMagickColor() gets the magick color of the pixel wand.

The format of the PixelGetMagickColor method is:

void PixelGetMagickColor(PixelWand *wand,PixelInfo *color)

A description of each parameter follows:

wand
the pixel wand.
color
The pixel wand color is returned here.

PixelGetPixel

PixelGetPixel() returns the pixel wand pixel.

The format of the PixelGetPixel method is:

PixelInfo PixelGetPixel(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetQuantumPacket

PixelGetQuantumPacket() gets the packet of the pixel wand as a PixelInfo.

The format of the PixelGetQuantumPacket method is:

void PixelGetQuantumPacket(PixelWand *wand,PixelInfo *packet)

A description of each parameter follows:

wand
the pixel wand.
packet
The pixel wand packet is returned here.

PixelGetQuantumPixel

PixelGetQuantumPixel() gets the pixel of the pixel wand as a PixelInfo.

The format of the PixelGetQuantumPixel method is:

void PixelGetQuantumPixel(const Image *image,const PixelWand *wand,
  Quantum *pixel)

A description of each parameter follows:

wand
the pixel wand.
pixel
The pixel wand pixel is returned here.

PixelGetRed

PixelGetRed() returns the normalized red color of the pixel wand.

The format of the PixelGetRed method is:

double PixelGetRed(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetRedQuantum

PixelGetRedQuantum() returns the red color of the pixel wand.

The format of the PixelGetRedQuantum method is:

Quantum PixelGetRedQuantum(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetYellow

PixelGetYellow() returns the normalized yellow color of the pixel wand.

The format of the PixelGetYellow method is:

double PixelGetYellow(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelGetYellowQuantum

PixelGetYellowQuantum() returns the yellow color of the pixel wand.

The format of the PixelGetYellowQuantum method is:

Quantum PixelGetYellowQuantum(const PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.

PixelSetAlpha

PixelSetAlpha() sets the normalized alpha value of the pixel wand.

The format of the PixelSetAlpha method is:

void PixelSetAlpha(PixelWand *wand,const double alpha)

A description of each parameter follows:

wand
the pixel wand.
alpha
the level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.

PixelSetAlphaQuantum

PixelSetAlphaQuantum() sets the alpha value of the pixel wand.

The format of the PixelSetAlphaQuantum method is:

void PixelSetAlphaQuantum(PixelWand *wand,const Quantum alpha)

A description of each parameter follows:

wand
the pixel wand.
alpha
the alpha value.

PixelSetBlack

PixelSetBlack() sets the normalized black color of the pixel wand.

The format of the PixelSetBlack method is:

void PixelSetBlack(PixelWand *wand,const double black)

A description of each parameter follows:

wand
the pixel wand.
black
the black color.

PixelSetBlackQuantum

PixelSetBlackQuantum() sets the black color of the pixel wand.

The format of the PixelSetBlackQuantum method is:

void PixelSetBlackQuantum(PixelWand *wand,const Quantum black)

A description of each parameter follows:

wand
the pixel wand.
black
the black color.

PixelSetBlue

PixelSetBlue() sets the normalized blue color of the pixel wand.

The format of the PixelSetBlue method is:

void PixelSetBlue(PixelWand *wand,const double blue)

A description of each parameter follows:

wand
the pixel wand.
blue
the blue color.

PixelSetBlueQuantum

PixelSetBlueQuantum() sets the blue color of the pixel wand.

The format of the PixelSetBlueQuantum method is:

void PixelSetBlueQuantum(PixelWand *wand,const Quantum blue)

A description of each parameter follows:

wand
the pixel wand.
blue
the blue color.

PixelSetColor

PixelSetColor() sets the color of the pixel wand with a string (e.g. "blue", "#0000ff", "rgb(0,0,255)", "cmyk(100,100,100,10)", etc.).

The format of the PixelSetColor method is:

MagickBooleanType PixelSetColor(PixelWand *wand,const char *color)

A description of each parameter follows:

wand
the pixel wand.
color
the pixel wand color.

PixelSetColorCount

PixelSetColorCount() sets the color count of the pixel wand.

The format of the PixelSetColorCount method is:

void PixelSetColorCount(PixelWand *wand,const size_t count)

A description of each parameter follows:

wand
the pixel wand.
count
the number of this particular color.

PixelSetColorFromWand

PixelSetColorFromWand() sets the color of the pixel wand.

The format of the PixelSetColorFromWand method is:

void PixelSetColorFromWand(PixelWand *wand,const PixelWand *color)

A description of each parameter follows:

wand
the pixel wand.
color
set the pixel wand color here.

PixelSetCyan

PixelSetCyan() sets the normalized cyan color of the pixel wand.

The format of the PixelSetCyan method is:

void PixelSetCyan(PixelWand *wand,const double cyan)

A description of each parameter follows:

wand
the pixel wand.
cyan
the cyan color.

PixelSetCyanQuantum

PixelSetCyanQuantum() sets the cyan color of the pixel wand.

The format of the PixelSetCyanQuantum method is:

void PixelSetCyanQuantum(PixelWand *wand,const Quantum cyan)

A description of each parameter follows:

wand
the pixel wand.
cyan
the cyan color.

PixelSetFuzz

PixelSetFuzz() sets the fuzz value of the pixel wand.

The format of the PixelSetFuzz method is:

void PixelSetFuzz(PixelWand *wand,const double fuzz)

A description of each parameter follows:

wand
the pixel wand.
fuzz
the fuzz value.

PixelSetGreen

PixelSetGreen() sets the normalized green color of the pixel wand.

The format of the PixelSetGreen method is:

void PixelSetGreen(PixelWand *wand,const double green)

A description of each parameter follows:

wand
the pixel wand.
green
the green color.

PixelSetGreenQuantum

PixelSetGreenQuantum() sets the green color of the pixel wand.

The format of the PixelSetGreenQuantum method is:

void PixelSetGreenQuantum(PixelWand *wand,const Quantum green)

A description of each parameter follows:

wand
the pixel wand.
green
the green color.

PixelSetHSL

PixelSetHSL() sets the normalized HSL color of the pixel wand.

The format of the PixelSetHSL method is:

void PixelSetHSL(PixelWand *wand,const double hue,
  const double saturation,const double lightness)

A description of each parameter follows:

wand
the pixel wand.
hue,saturation,lightness
Return the pixel hue, saturation, and brightness.

PixelSetIndex

PixelSetIndex() sets the colormap index of the pixel wand.

The format of the PixelSetIndex method is:

void PixelSetIndex(PixelWand *wand,const Quantum index)

A description of each parameter follows:

wand
the pixel wand.
index
the colormap index.

PixelSetMagenta

PixelSetMagenta() sets the normalized magenta color of the pixel wand.

The format of the PixelSetMagenta method is:

void PixelSetMagenta(PixelWand *wand,const double magenta)

A description of each parameter follows:

wand
the pixel wand.
magenta
the magenta color.

PixelSetMagentaQuantum

PixelSetMagentaQuantum() sets the magenta color of the pixel wand.

The format of the PixelSetMagentaQuantum method is:

void PixelSetMagentaQuantum(PixelWand *wand,
  const Quantum magenta)

A description of each parameter follows:

wand
the pixel wand.
magenta
the green magenta.

PixelSetPixelColor

PixelSetPixelColor() sets the color of the pixel wand.

The format of the PixelSetPixelColor method is:

void PixelSetPixelColor(PixelWand *wand,const PixelInfo *color)

A description of each parameter follows:

wand
the pixel wand.
color
the pixel wand color.

PixelSetQuantumPixel

PixelSetQuantumPixel() sets the pixel of the pixel wand.

The format of the PixelSetQuantumPixel method is:

void PixelSetQuantumPixel(const Image *image,const Quantum *pixel,
  PixelWand *wand)

A description of each parameter follows:

wand
the pixel wand.
pixel
the pixel wand pixel.

PixelSetRed

PixelSetRed() sets the normalized red color of the pixel wand.

The format of the PixelSetRed method is:

void PixelSetRed(PixelWand *wand,const double red)

A description of each parameter follows:

wand
the pixel wand.
red
the red color.

PixelSetRedQuantum

PixelSetRedQuantum() sets the red color of the pixel wand.

The format of the PixelSetRedQuantum method is:

void PixelSetRedQuantum(PixelWand *wand,const Quantum red)

A description of each parameter follows:

wand
the pixel wand.
red
the red color.

PixelSetYellow

PixelSetYellow() sets the normalized yellow color of the pixel wand.

The format of the PixelSetYellow method is:

void PixelSetYellow(PixelWand *wand,const double yellow)

A description of each parameter follows:

wand
the pixel wand.
yellow
the yellow color.

PixelSetYellowQuantum

PixelSetYellowQuantum() sets the yellow color of the pixel wand.

The format of the PixelSetYellowQuantum method is:

void PixelSetYellowQuantum(PixelWand *wand,const Quantum yellow)

A description of each parameter follows:

wand
the pixel wand.
yellow
the yellow color.
ImageMagick: MagickCore, C API for ImageMagick: Image Methods

AcquireImageAcquireImageInfoAcquireNextImageAppendImagesCatchImageExceptionClipImagePathCloneImageCloneImageInfoCopyImagePixelsDestroyImageDestroyImageInfoGetImageInfoGetImageInfoFileGetImageMaskGetImageVirtualPixelMethodInterpretImageFilenameIsHighDynamicRangeImageIsImageObjectIsTaintImageModifyImageNewMagickImageReferenceImageResetImagePageSetImageBackgroundColorSetImageChannelMaskSetImageColorSetImageStorageClassSetImageExtentSetImageInfoBlobSetImageInfoFileSetImageMaskSetImageAlphaSetImageVirtualPixelMethodSmushImagesStripImageSyncImageSettings

AcquireImage

AcquireImage() returns a pointer to an image structure initialized to default values.

The format of the AcquireImage method is:

Image *AcquireImage(const ImageInfo *image_info,ExceptionInfo *exception)

A description of each parameter follows:

image_info
Many of the image default values are set from this structure. For example, filename, compression, depth, background color, and others.
exception
return any errors or warnings in this structure.

AcquireImageInfo

AcquireImageInfo() allocates the ImageInfo structure.

The format of the AcquireImageInfo method is:

ImageInfo *AcquireImageInfo(void)

AcquireNextImage

AcquireNextImage() initializes the next image in a sequence to default values. The next member of image points to the newly allocated image. If there is a memory shortage, next is assigned NULL.

The format of the AcquireNextImage method is:

void AcquireNextImage(const ImageInfo *image_info,Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image_info
Many of the image default values are set from this structure. For example, filename, compression, depth, background color, and others.
image
the image.
exception
return any errors or warnings in this structure.

AppendImages

AppendImages() takes all images from the current image pointer to the end of the image list and appends them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right.

The current gravity setting effects how the image is justified in the final image.

The format of the AppendImages method is:

Image *AppendImages(const Image *images,const MagickBooleanType stack,
  ExceptionInfo *exception)

A description of each parameter follows:

images
the image sequence.
stack
A value other than 0 stacks the images top-to-bottom.
exception
return any errors or warnings in this structure.

CatchImageException

CatchImageException() returns if no exceptions are found in the image sequence, otherwise it determines the most severe exception and reports it as a warning or error depending on the severity.

The format of the CatchImageException method is:

ExceptionType CatchImageException(Image *image)

A description of each parameter follows:

image
An image sequence.

ClipImagePath

ClipImagePath() sets the image clip mask based any clipping path information if it exists.

The format of the ClipImagePath method is:

MagickBooleanType ClipImagePath(Image *image,const char *pathname,
  const MagickBooleanType inside,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
pathname
name of clipping path resource. If name is preceded by #, use clipping path numbered by name.
inside
if non-zero, later operations take effect inside clipping path. Otherwise later operations take effect outside clipping path.
exception
return any errors or warnings in this structure.

CloneImage

CloneImage() copies an image and returns the copy as a new image object.

If the specified columns and rows is 0, an exact copy of the image is returned, otherwise the pixel data is undefined and must be initialized with the QueueAuthenticPixels() and SyncAuthenticPixels() methods. On failure, a NULL image is returned and exception describes the reason for the failure.

The format of the CloneImage method is:

Image *CloneImage(const Image *image,const size_t columns,
  const size_t rows,const MagickBooleanType orphan,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
columns
the number of columns in the cloned image.
rows
the number of rows in the cloned image.
detach
With a value other than 0, the cloned image is detached from its parent I/O stream.
exception
return any errors or warnings in this structure.

CloneImageInfo

CloneImageInfo() makes a copy of the given image info structure. If NULL is specified, a new image info structure is created initialized to default values.

The format of the CloneImageInfo method is:

ImageInfo *CloneImageInfo(const ImageInfo *image_info)

A description of each parameter follows:

image_info
the image info.

CopyImagePixels

CopyImagePixels() copies pixels from the source image as defined by the geometry the destination image at the specified offset.

The format of the CopyImagePixels method is:

MagickBooleanType CopyImagePixels(Image *image,const Image *source_image,
  const RectangleInfo *geometry,const OffsetInfo *offset,
  ExceptionInfo *exception);

A description of each parameter follows:

image
the destination image.
source_image
the source image.
geometry
define the dimensions of the source pixel rectangle.
offset
define the offset in the destination image.
exception
return any errors or warnings in this structure.

DestroyImage

DestroyImage() dereferences an image, deallocating memory associated with the image if the reference count becomes zero.

The format of the DestroyImage method is:

Image *DestroyImage(Image *image)

A description of each parameter follows:

image
the image.

DestroyImageInfo

DestroyImageInfo() deallocates memory associated with an ImageInfo structure.

The format of the DestroyImageInfo method is:

ImageInfo *DestroyImageInfo(ImageInfo *image_info)

A description of each parameter follows:

image_info
the image info.

GetImageInfo

GetImageInfo() initializes image_info to default values.

The format of the GetImageInfo method is:

void GetImageInfo(ImageInfo *image_info)

A description of each parameter follows:

image_info
the image info.

GetImageInfoFile

GetImageInfoFile() returns the image info file member.

The format of the GetImageInfoFile method is:

FILE *GetImageInfoFile(const ImageInfo *image_info)

A description of each parameter follows:

image_info
the image info.

GetImageMask

GetImageMask() returns the mask associated with the image.

The format of the GetImageMask method is:

Image *GetImageMask(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.

GetImageVirtualPixelMethod

GetImageVirtualPixelMethod() gets the "virtual pixels" method for the image. A virtual pixel is any pixel access that is outside the boundaries of the image cache.

The format of the GetImageVirtualPixelMethod() method is:

VirtualPixelMethod GetImageVirtualPixelMethod(const Image *image)

A description of each parameter follows:

image
the image.

InterpretImageFilename

InterpretImageFilename() interprets embedded characters in an image filename. The filename length is returned.

The format of the InterpretImageFilename method is:

size_t InterpretImageFilename(const ImageInfo *image_info,Image *image,
  const char *format,int value,char *filename,ExceptionInfo *exception)

A description of each parameter follows.

image_info

the image info..

image

the image.

format

A filename describing the format to use to write the numeric argument. Only the first numeric format identifier is replaced.

value

Numeric value to substitute into format filename.

filename

return the formatted filename in this character buffer.

exception

return any errors or warnings in this structure.

IsHighDynamicRangeImage

IsHighDynamicRangeImage() returns MagickTrue if any pixel component is non-integer or exceeds the bounds of the quantum depth (e.g. for Q16 0..65535.

The format of the IsHighDynamicRangeImage method is:

MagickBooleanType IsHighDynamicRangeImage(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

IsImageObject

IsImageObject() returns MagickTrue if the image sequence contains a valid set of image objects.

The format of the IsImageObject method is:

MagickBooleanType IsImageObject(const Image *image)

A description of each parameter follows:

image
the image.

IsTaintImage

IsTaintImage() returns MagickTrue any pixel in the image has been altered since it was first constituted.

The format of the IsTaintImage method is:

MagickBooleanType IsTaintImage(const Image *image)

A description of each parameter follows:

image
the image.

ModifyImage

ModifyImage() ensures that there is only a single reference to the image to be modified, updating the provided image pointer to point to a clone of the original image if necessary.

The format of the ModifyImage method is:

MagickBooleanType ModifyImage(Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

NewMagickImage

NewMagickImage() creates a blank image canvas of the specified size and background color.

The format of the NewMagickImage method is:

Image *NewMagickImage(const ImageInfo *image_info,const size_t width,
  const size_t height,const PixelInfo *background,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
width
the image width.
height
the image height.
background
the image color.
exception
return any errors or warnings in this structure.

ReferenceImage

ReferenceImage() increments the reference count associated with an image returning a pointer to the image.

The format of the ReferenceImage method is:

Image *ReferenceImage(Image *image)

A description of each parameter follows:

image
the image.

ResetImagePage

ResetImagePage() resets the image page canvas and position.

The format of the ResetImagePage method is:

MagickBooleanType ResetImagePage(Image *image,const char *page)

A description of each parameter follows:

image
the image.
page
the relative page specification.

SetImageBackgroundColor

SetImageBackgroundColor() initializes the image pixels to the image background color. The background color is defined by the background_color member of the image structure.

The format of the SetImage method is:

MagickBooleanType SetImageBackgroundColor(Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

SetImageChannelMask

SetImageChannelMask() sets the image channel mask from the specified channel mask.

The format of the SetImageChannelMask method is:

ChannelType SetImageChannelMask(Image *image,
  const ChannelType channel_mask)

A description of each parameter follows:

image
the image.
channel_mask
the channel mask.

SetImageColor

SetImageColor() set the entire image canvas to the specified color.

The format of the SetImageColor method is:

MagickBooleanType SetImageColor(Image *image,const PixelInfo *color,
  ExeptionInfo *exception)

A description of each parameter follows:

image
the image.
background
the image color.
exception
return any errors or warnings in this structure.

SetImageStorageClass

SetImageStorageClass() sets the image class: DirectClass for true color images or PseudoClass for colormapped images.

The format of the SetImageStorageClass method is:

MagickBooleanType SetImageStorageClass(Image *image,
  const ClassType storage_class,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
storage_class
The image class.
exception
return any errors or warnings in this structure.

SetImageExtent

SetImageExtent() sets the image size (i.e. columns & rows).

The format of the SetImageExtent method is:

MagickBooleanType SetImageExtent(Image *image,const size_t columns,
  const size_t rows,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
columns
The image width in pixels.
rows
The image height in pixels.
exception
return any errors or warnings in this structure.

SetImageInfoBlob

SetImageInfoBlob() sets the image info blob member.

The format of the SetImageInfoBlob method is:

void SetImageInfoBlob(ImageInfo *image_info,const void *blob,
  const size_t length)

A description of each parameter follows:

image_info
the image info.
blob
the blob.
length
the blob length.

SetImageInfoFile

SetImageInfoFile() sets the image info file member.

The format of the SetImageInfoFile method is:

void SetImageInfoFile(ImageInfo *image_info,FILE *file)

A description of each parameter follows:

image_info
the image info.
file
the file.

SetImageMask

SetImageMask() associates a mask with the image. The mask must be the same dimensions as the image.

The format of the SetImageMask method is:

MagickBooleanType SetImageMask(Image *image,const PixelMask type,
  const Image *mask,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
type
the mask type, ReadPixelMask or WritePixelMask.
mask
the image mask.
exception
return any errors or warnings in this structure.

SetImageAlpha

SetImageAlpha() sets the alpha levels of the image.

The format of the SetImageAlpha method is:

MagickBooleanType SetImageAlpha(Image *image,const Quantum alpha,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
Alpha
the level of transparency: 0 is fully opaque and QuantumRange is fully transparent.

SetImageVirtualPixelMethod

SetImageVirtualPixelMethod() sets the "virtual pixels" method for the image and returns the previous setting. A virtual pixel is any pixel access that is outside the boundaries of the image cache.

The format of the SetImageVirtualPixelMethod() method is:

VirtualPixelMethod SetImageVirtualPixelMethod(Image *image,
  const VirtualPixelMethod virtual_pixel_method,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
virtual_pixel_method
choose the type of virtual pixel.
exception
return any errors or warnings in this structure.

SmushImages

SmushImages() takes all images from the current image pointer to the end of the image list and smushes them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right.

The current gravity setting now effects how the image is justified in the final image.

The format of the SmushImages method is:

Image *SmushImages(const Image *images,const MagickBooleanType stack,
  ExceptionInfo *exception)

A description of each parameter follows:

images
the image sequence.
stack
A value other than 0 stacks the images top-to-bottom.
offset
minimum distance in pixels between images.
exception
return any errors or warnings in this structure.

StripImage

StripImage() strips an image of all profiles and comments.

The format of the StripImage method is:

MagickBooleanType StripImage(Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

SyncImageSettings

SyncImageSettings() syncs any image_info global options into per-image attributes.

Note: in IMv6 free form 'options' were always mapped into 'artifacts', so that operations and coders can find such settings. In IMv7 if a desired per-image artifact is not set, then it will directly look for a global option as a fallback, as such this copy is no longer needed, only the link set up.

The format of the SyncImageSettings method is:

MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
  Image *image,ExceptionInfo *exception)
MagickBooleanType SyncImagesSettings(const ImageInfo *image_info,
  Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
image
the image.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Draw on an Image

AcquireDrawInfoCloneDrawInfoDestroyDrawInfoDrawAffineImageDrawClipPathDrawImageDrawGradientImageDrawPatternPathDrawPrimitiveGetAffineMatrix

AcquireDrawInfo

AcquireDrawInfo() returns a DrawInfo structure properly initialized.

The format of the AcquireDrawInfo method is:

DrawInfo *AcquireDrawInfo(void)

CloneDrawInfo

CloneDrawInfo() makes a copy of the given draw_info structure. If NULL is specified, a new DrawInfo structure is created initialized to default values.

The format of the CloneDrawInfo method is:

DrawInfo *CloneDrawInfo(const ImageInfo *image_info,
  const DrawInfo *draw_info)

A description of each parameter follows:

image_info
the image info.
draw_info
the draw info.

DestroyDrawInfo

DestroyDrawInfo() deallocates memory associated with an DrawInfo structure.

The format of the DestroyDrawInfo method is:

DrawInfo *DestroyDrawInfo(DrawInfo *draw_info)

A description of each parameter follows:

draw_info
the draw info.

DrawAffineImage

DrawAffineImage() composites the source over the destination image as dictated by the affine transform.

The format of the DrawAffineImage method is:

MagickBooleanType DrawAffineImage(Image *image,const Image *source,
  const AffineMatrix *affine,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
source
the source image.
affine
the affine transform.
exception
return any errors or warnings in this structure.

DrawClipPath

DrawClipPath() draws the clip path on the image mask.

The format of the DrawClipPath method is:

MagickBooleanType DrawClipPath(Image *image,const DrawInfo *draw_info,
  const char *name,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
name
the name of the clip path.
exception
return any errors or warnings in this structure.

DrawImage

DrawImage() draws a graphic primitive on your image. The primitive may be represented as a string or filename. Precede the filename with an "at" sign (@) and the contents of the file are drawn on the image. You can affect how text is drawn by setting one or more members of the draw info structure.

The format of the DrawImage method is:

MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
exception
return any errors or warnings in this structure.

DrawGradientImage

DrawGradientImage() draws a linear gradient on the image.

The format of the DrawGradientImage method is:

MagickBooleanType DrawGradientImage(Image *image,
  const DrawInfo *draw_info,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
exception
return any errors or warnings in this structure.

DrawPatternPath

DrawPatternPath() draws a pattern.

The format of the DrawPatternPath method is:

MagickBooleanType DrawPatternPath(Image *image,const DrawInfo *draw_info,
  const char *name,Image **pattern,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
name
the pattern name.
image
the image.
exception
return any errors or warnings in this structure.

DrawPrimitive

DrawPrimitive() draws a primitive (line, rectangle, ellipse) on the image.

The format of the DrawPrimitive method is:

MagickBooleanType DrawPrimitive(Image *image,const DrawInfo *draw_info,
  PrimitiveInfo *primitive_info,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
primitive_info
Specifies a pointer to a PrimitiveInfo structure.
exception
return any errors or warnings in this structure.

GetAffineMatrix

GetAffineMatrix() returns an AffineMatrix initialized to the identity matrix.

The format of the GetAffineMatrix method is:

void GetAffineMatrix(AffineMatrix *affine_matrix)

A description of each parameter follows:

affine_matrix
the affine matrix.
ImageMagick: MagickCore, C API for ImageMagick: Dealing with Image Layers

CoalesceImagesDisposeImagesCompareImagesLayersOptimizeImageLayersOptimizeImagePlusLayersOptimizeImageTransparencyRemoveDuplicateLayersRemoveZeroDelayLayersCompositeLayersMergeImageLayers

CoalesceImages

CoalesceImages() composites a set of images while respecting any page offsets and disposal methods. GIF, MIFF, and MNG animation sequences typically start with an image background and each subsequent image varies in size and offset. A new image sequence is returned with all images the same size as the first images virtual canvas and composited with the next image in the sequence.

The format of the CoalesceImages method is:

Image *CoalesceImages(Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image sequence.
exception
return any errors or warnings in this structure.

DisposeImages

DisposeImages() returns the coalesced frames of a GIF animation as it would appear after the GIF dispose method of that frame has been applied. That is it returned the appearance of each frame before the next is overlaid.

The format of the DisposeImages method is:

Image *DisposeImages(Image *image,ExceptionInfo *exception)

A description of each parameter follows:

images
the image sequence.
exception
return any errors or warnings in this structure.

CompareImagesLayers

CompareImagesLayers() compares each image with the next in a sequence and returns the minimum bounding region of all the pixel differences (of the LayerMethod specified) it discovers.

Images do NOT have to be the same size, though it is best that all the images are 'coalesced' (images are all the same size, on a flattened canvas, so as to represent exactly how an specific frame should look).

No GIF dispose methods are applied, so GIF animations must be coalesced before applying this image operator to find differences to them.

The format of the CompareImagesLayers method is:

Image *CompareImagesLayers(const Image *images,
  const LayerMethod method,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
method
the layers type to compare images with. Must be one of... CompareAnyLayer, CompareClearLayer, CompareOverlayLayer.
exception
return any errors or warnings in this structure.

OptimizeImageLayers

OptimizeImageLayers() compares each image the GIF disposed forms of the previous image in the sequence. From this it attempts to select the smallest cropped image to replace each frame, while preserving the results of the GIF animation.

The format of the OptimizeImageLayers method is:

Image *OptimizeImageLayers(const Image *image,
         ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

OptimizeImagePlusLayers

OptimizeImagePlusLayers() is exactly as OptimizeImageLayers(), but may also add or even remove extra frames in the animation, if it improves the total number of pixels in the resulting GIF animation.

The format of the OptimizePlusImageLayers method is:

Image *OptimizePlusImageLayers(const Image *image,
         ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

OptimizeImageTransparency

OptimizeImageTransparency() takes a frame optimized GIF animation, and compares the overlayed pixels against the disposal image resulting from all the previous frames in the animation. Any pixel that does not change the disposal image (and thus does not effect the outcome of an overlay) is made transparent.

WARNING: This modifies the current images directly, rather than generate a new image sequence.

The format of the OptimizeImageTransperency method is:

void OptimizeImageTransperency(Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image sequence
exception
return any errors or warnings in this structure.

RemoveDuplicateLayers

RemoveDuplicateLayers() removes any image that is exactly the same as the next image in the given image list. Image size and virtual canvas offset must also match, though not the virtual canvas size itself.

No check is made with regards to image disposal setting, though it is the dispose setting of later image that is kept. Also any time delays are also added together. As such coalesced image animations should still produce the same result, though with duplicte frames merged into a single frame.

The format of the RemoveDuplicateLayers method is:

void RemoveDuplicateLayers(Image **image, ExceptionInfo *exception)

A description of each parameter follows:

images
the image list
exception
return any errors or warnings in this structure.

RemoveZeroDelayLayers

RemoveZeroDelayLayers() removes any image that as a zero delay time. Such images generally represent intermediate or partial updates in GIF animations used for file optimization. They are not ment to be displayed to users of the animation. Viewable images in an animation should have a time delay of 3 or more centi-seconds (hundredths of a second).

However if all the frames have a zero time delay, then either the animation is as yet incomplete, or it is not a GIF animation. This a non-sensible situation, so no image will be removed and a 'Zero Time Animation' warning (exception) given.

No warning will be given if no image was removed because all images had an appropriate non-zero time delay set.

Due to the special requirements of GIF disposal handling, GIF animations should be coalesced first, before calling this function, though that is not a requirement.

The format of the RemoveZeroDelayLayers method is:

void RemoveZeroDelayLayers(Image **image, ExceptionInfo *exception)

A description of each parameter follows:

images
the image list
exception
return any errors or warnings in this structure.

CompositeLayers

CompositeLayers() compose the source image sequence over the destination image sequence, starting with the current image in both lists.

Each layer from the two image lists are composted together until the end of one of the image lists is reached. The offset of each composition is also adjusted to match the virtual canvas offsets of each layer. As such the given offset is relative to the virtual canvas, and not the actual image.

Composition uses given x and y offsets, as the 'origin' location of the source images virtual canvas (not the real image) allowing you to compose a list of 'layer images' into the destiantioni images. This makes it well sutiable for directly composing 'Clears Frame Animations' or 'Coaleased Animations' onto a static or other 'Coaleased Animation' destination image list. GIF disposal handling is not looked at.

Special case:- If one of the image sequences is the last image (just a single image remaining), that image is repeatally composed with all the images in the other image list. Either the source or destination lists may be the single image, for this situation.

In the case of a single destination image (or last image given), that image will ve cloned to match the number of images remaining in the source image list.

This is equivelent to the "-layer Composite" Shell API operator.

The format of the CompositeLayers method is:

void CompositeLayers(Image *destination, const CompositeOperator
compose, Image *source, const ssize_t x_offset, const ssize_t y_offset,
ExceptionInfo *exception);

A description of each parameter follows:

destination
the destination images and results
source
source image(s) for the layer composition
compose, x_offset, y_offset
arguments passed on to CompositeImages()
exception
return any errors or warnings in this structure.

MergeImageLayers

MergeImageLayers() composes all the image layers from the current given image onward to produce a single image of the merged layers.

The inital canvas's size depends on the given LayerMethod, and is initialized using the first images background color. The images are then compositied onto that image in sequence using the given composition that has been assigned to each individual image.

The format of the MergeImageLayers is:

Image *MergeImageLayers(const Image *image,
  const LayerMethod method, ExceptionInfo *exception)

A description of each parameter follows:

image
the image list to be composited together
method
the method of selecting the size of the initial canvas.
MergeLayer: Merge all layers onto a canvas just large enough to hold all the actual images. The virtual canvas of the first image is preserved but otherwise ignored.
FlattenLayer: Use the virtual canvas size of first image. Images which fall outside this canvas is clipped. This can be used to 'fill out' a given virtual canvas.
MosaicLayer: Start with the virtual canvas of the first image, enlarging left and right edges to contain all images. Images with negative offsets will be clipped.
TrimBoundsLayer: Determine the overall bounds of all the image layers just as in "MergeLayer", then adjust the the canvas and offsets to be relative to those bounds, without overlaying the images.
WARNING: a new image is not returned, the original image sequence page data is modified instead.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Count the Colors in an Image

AcquireColorCacheGetColorInfoListGetColorListListColorInfoQueryColorname

AcquireColorCache

AcquireColorCache() caches one or more color configurations which provides a mapping between color attributes and a color name.

The format of the AcquireColorCache method is:

LinkedListInfo *AcquireColorCache(const char *filename,
  ExceptionInfo *exception)

A description of each parameter follows:

filename
the font file name.
exception
return any errors or warnings in this structure.

GetColorInfoList

GetColorInfoList() returns any colors that match the specified pattern.

The format of the GetColorInfoList function is:

const ColorInfo **GetColorInfoList(const char *pattern,
  size_t *number_colors,ExceptionInfo *exception)

A description of each parameter follows:

pattern
Specifies a pointer to a text string containing a pattern.
number_colors
This integer returns the number of colors in the list.
exception
return any errors or warnings in this structure.

GetColorList

GetColorList() returns any colors that match the specified pattern.

The format of the GetColorList function is:

char **GetColorList(const char *pattern,size_t *number_colors,
  ExceptionInfo *exception)

A description of each parameter follows:

pattern
Specifies a pointer to a text string containing a pattern.
number_colors
This integer returns the number of colors in the list.
exception
return any errors or warnings in this structure.

ListColorInfo

ListColorInfo() lists color names to the specified file. Color names are a convenience. Rather than defining a color by its red, green, and blue intensities just use a color name such as white, blue, or yellow.

The format of the ListColorInfo method is:

MagickBooleanType ListColorInfo(FILE *file,ExceptionInfo *exception)

A description of each parameter follows.

file

List color names to this file handle.

exception

return any errors or warnings in this structure.

QueryColorname

QueryColorname() returns a named color for the given color intensity. If an exact match is not found, a hex value is returned instead. For example an intensity of rgb:(0,0,0) returns black whereas rgb:(223,223,223) returns #dfdfdf.

UPDATE: the 'image' argument is no longer needed as all information should have been preset using GetPixelInfo().

The format of the QueryColorname method is:

MagickBooleanType QueryColorname(const Image *image,
  const PixelInfo *color,const ComplianceType compliance,char *name,
  ExceptionInfo *exception)

A description of each parameter follows.

image

the image. (not used! - color gets settings from GetPixelInfo()

color

the color intensities.

Compliance

Adhere to this color standard: SVG, X11, or XPM.

name

Return the color name or hex value.

exception

return any errors or warnings in this structure.

ImageMagick: MagickWand, C API for ImageMagick: Image Methods

GetImageFromMagickWandMagickAdaptiveBlurImageMagickAdaptiveResizeImageMagickAdaptiveSharpenImageMagickAdaptiveThresholdImageMagickAddImageMagickAddNoiseImageMagickAffineTransformImageMagickAnnotateImageMagickAnimateImagesMagickAppendImagesMagickAutoGammaImageMagickAutoLevelImageMagickAutoOrientImageMagickBlackThresholdImageMagickBlueShiftImageMagickBlurImageMagickBorderImageUse MagickBrightnessContrastImageMagickChannelFxImageMagickCharcoalImageMagickChopImageMagickClampImageMagickClipImageMagickClipImagePathMagickClutImageMagickCoalesceImagesMagickColorDecisionListImageMagickColorizeImageMagickColorMatrixImageMagickCombineImagesMagickCommentImageMagickCompareImagesLayersMagickCompareImagesMagickCompositeImageMagickCompositeImageGravityMagickCompositeLayersMagickContrastImageMagickContrastStretchImageMagickConvolveImageMagickCropImageMagickCycleColormapImageMagickConstituteImageMagickDecipherImageMagickDeconstructImagesMagickDeskewImageMagickDespeckleImageMagickDestroyImageMagickDisplayImageMagickDisplayImagesMagickDistortImageMagickDrawImageMagickEdgeImageMagickEmbossImageMagickEncipherImageMagickEnhanceImageMagickEqualizeImageMagickEvaluateImageMagickExportImagePixelsMagickExtentImageMagickFlipImageMagickFloodfillPaintImageMagickFlopImageMagickForwardFourierTransformImageMagickFrameImageMagickFunctionImageMagickFxImageMagickGammaImageMagickGaussianBlurImageMagickGetImageMagickGetImageAlphaChannelMagickGetImageMaskMagickGetImageBackgroundColorMagickGetImageBlobMagickGetImageBlobMagickGetImageBluePrimaryMagickGetImageBorderColorMagickGetImageFeaturesMagickGetImageKurtosisMagickGetImageMeanMagickGetImageRangeMagickGetImageStatisticsMagickGetImageColormapColorMagickGetImageColorsMagickGetImageColorspaceMagickGetImageComposeMagickGetImageCompressionMagickGetImageCompressionQualityMagickGetImageDelayMagickGetImageDepthMagickGetImageDisposeMagickGetImageDistortionMagickGetImageDistortionsMagickGetImageEndianMagickGetImageFilenameMagickGetImageFormatMagickGetImageFuzzMagickGetImageGammaMagickGetImageGravityMagickGetImageGreenPrimaryMagickGetImageHeightMagickGetImageHistogramMagickGetImageInterlaceSchemeMagickGetImageInterpolateMethodMagickGetImageIterationsMagickGetImageLengthMagickGetImageMatteColorMagickGetImageOrientationMagickGetImagePageMagickGetImagePixelColorMagickGetImageRedPrimaryMagickGetImageRegionMagickGetImageRenderingIntentMagickGetImageResolutionMagickGetImageSceneMagickGetImageSignatureMagickGetImageTicksPerSecondMagickGetImageTypeMagickGetImageUnitsMagickGetImageVirtualPixelMethodMagickGetImageWhitePointMagickGetImageWidthMagickGetNumberImagesMagickGetImageTotalInkDensityMagickHaldClutImageMagickHasNextImageMagickHasPreviousImageMagickIdentifyImageMagickIdentifyImageTypeMagickImplodeImageMagickImportImagePixelsMagickInterpolativeResizeImageMagickInverseFourierTransformImageMagickLabelImageMagickLevelImageMagickLinearStretchImageMagickLiquidRescaleImageMagickMagnifyImageMagickMergeImageLayersMagickMinifyImageMagickModulateImageMagickMontageImageMagickMorphImagesMagickMorphologyImageMagickMotionBlurImageMagickNegateImageMagickNewImageMagickNextImageMagickNormalizeImageMagickOilPaintImageMagickOpaquePaintImageMagickOptimizeImageLayersMagickOptimizeImageTransparencyMagickOrderedPosterizeImageMagickPingImageMagickPingImageBlobMagickPingImageFileMagickPolaroidImageMagickPosterizeImageMagickPreviewImagesMagickPreviousImageMagickQuantizeImageMagickQuantizeImagesMagickRotationalBlurImageMagickRaiseImageMagickRandomThresholdImageMagickReadImageMagickReadImageBlobMagickReadImageFileMagickRemapImageMagickRemoveImageMagickResampleImageMagickResetImagePageMagickResizeImageMagickRollImageMagickRotateImageMagickSampleImageMagickScaleImageMagickSegmentImageMagickSelectiveBlurImageMagickSeparateImageMagickSepiaToneImageMagickSetImageMagickSetImageAlphaChannelMagickSetImageBackgroundColorMagickSetImageBluePrimaryMagickSetImageBorderColorMagickSetImageChannelMaskMagickSetImageMaskMagickSetImageColorMagickSetImageColormapColorMagickSetImageColorspaceMagickSetImageComposeMagickSetImageCompressionMagickSetImageCompressionQualityMagickSetImageDelayMagickSetImageDepthMagickSetImageDisposeMagickSetImageEndianMagickSetImageExtentMagickSetImageFilenameMagickSetImageFormatMagickSetImageFuzzMagickSetImageGammaMagickSetImageGravityMagickSetImageGreenPrimaryMagickSetImageInterlaceSchemeMagickSetImagePixelInterpolateMethodMagickSetImageIterationsMagickSetImageMatteMagickSetImageMatteColorMagickSetImageAlphaMagickSetImageOrientationMagickSetImagePageMagickSetImageProgressMonitorMagickSetImageRedPrimaryMagickSetImageRenderingIntentMagickSetImageResolutionMagickSetImageSceneMagickSetImageTicksPerSecondMagickSetImageTypeMagickSetImageUnitsMagickSetImageVirtualPixelMethodMagickSetImageWhitePointMagickShadeImageMagickShadowImageMagickSharpenImageMagickShaveImageMagickShearImageMagickSigmoidalContrastImageMagickSimilarityImageMagickSketchImageMagickSmushImagesMagickSolarizeImageMagickSparseColorImageMagickSpliceImageMagickSpreadImageMagickStatisticImageMagickSteganoImageMagickStereoImageMagickStripImageMagickSwirlImageMagickTextureImageMagickThresholdImageMagickThumbnailImageMagickTintImageMagickTransformImageMagickTransformImageColorspaceMagickTransparentPaintImageMagickTransposeImageMagickTransverseImageMagickTrimImageMagickUniqueImageColorsMagickUnsharpMaskImageMagickVignetteImageMagickWaveImageMagickWhiteThresholdImageMagickWriteImageMagickWriteImageFileMagickWriteImagesMagickWriteImagesFile

GetImageFromMagickWand

GetImageFromMagickWand() returns the current image from the magick wand.

The format of the GetImageFromMagickWand method is:

Image *GetImageFromMagickWand(const MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickAdaptiveBlurImage

MagickAdaptiveBlurImage() adaptively blurs the image by blurring less intensely near image edges and more intensely far from edges. We blur the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and MagickAdaptiveBlurImage() selects a suitable radius for you.

The format of the MagickAdaptiveBlurImage method is:

MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
  const double radius,const double sigma)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.

MagickAdaptiveResizeImage

MagickAdaptiveResizeImage() adaptively resize image with data dependent triangulation.

MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand, const size_t columns,const size_t rows)

A description of each parameter follows:

wand
the magick wand.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.

MagickAdaptiveSharpenImage

MagickAdaptiveSharpenImage() adaptively sharpens the image by sharpening more intensely near image edges and less intensely far from edges. We sharpen the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and MagickAdaptiveSharpenImage() selects a suitable radius for you.

The format of the MagickAdaptiveSharpenImage method is:

MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand,
  const double radius,const double sigma)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.

MagickAdaptiveThresholdImage

MagickAdaptiveThresholdImage() selects an individual threshold for each pixel based on the range of intensity values in its local neighborhood. This allows for thresholding of an image whose global intensity histogram doesn't contain distinctive peaks.

The format of the AdaptiveThresholdImage method is:

MagickBooleanType MagickAdaptiveThresholdImage(MagickWand *wand,
  const size_t width,const size_t height,const double bias)

A description of each parameter follows:

wand
the magick wand.
width
the width of the local neighborhood.
height
the height of the local neighborhood.
offset
the mean bias.

MagickAddImage

MagickAddImage() adds a clone of the images from the second wand and inserts them into the first wand.

Use MagickSetLastIterator(), to append new images into an existing wand, current image will be set to last image so later adds with also be appened to end of wand.

Use MagickSetFirstIterator() to prepend new images into wand, any more images added will also be prepended before other images in the wand. However the order of a list of new images will not change.

Otherwise the new images will be inserted just after the current image, and any later image will also be added after this current image but before the previously added images. Caution is advised when multiple image adds are inserted into the middle of the wand image list.

The format of the MagickAddImage method is:

MagickBooleanType MagickAddImage(MagickWand *wand,
  const MagickWand *add_wand)

A description of each parameter follows:

wand
the magick wand.
add_wand
A wand that contains the image list to be added

MagickAddNoiseImage

MagickAddNoiseImage() adds random noise to the image.

The format of the MagickAddNoiseImage method is:

MagickBooleanType MagickAddNoiseImage(MagickWand *wand,
  const NoiseType noise_type,const double attenuate)

A description of each parameter follows:

wand
the magick wand.
noise_type
The type of noise: Uniform, Gaussian, Multiplicative, Impulse, Laplacian, or Poisson.
attenuate
attenuate the random distribution.

MagickAffineTransformImage

MagickAffineTransformImage() transforms an image as dictated by the affine matrix of the drawing wand.

The format of the MagickAffineTransformImage method is:

MagickBooleanType MagickAffineTransformImage(MagickWand *wand,
  const DrawingWand *drawing_wand)

A description of each parameter follows:

wand
the magick wand.
drawing_wand
the draw wand.

MagickAnnotateImage

MagickAnnotateImage() annotates an image with text.

The format of the MagickAnnotateImage method is:

MagickBooleanType MagickAnnotateImage(MagickWand *wand,
  const DrawingWand *drawing_wand,const double x,const double y,
  const double angle,const char *text)

A description of each parameter follows:

wand
the magick wand.
drawing_wand
the draw wand.
x
x ordinate to left of text
y
y ordinate to text baseline
angle
rotate text relative to this angle.
text
text to draw

MagickAnimateImages

MagickAnimateImages() animates an image or image sequence.

The format of the MagickAnimateImages method is:

MagickBooleanType MagickAnimateImages(MagickWand *wand,
  const char *server_name)

A description of each parameter follows:

wand
the magick wand.
server_name
the X server name.

MagickAppendImages

MagickAppendImages() append the images in a wand from the current image onwards, creating a new wand with the single image result. This is affected by the gravity and background settings of the first image.

Typically you would call either MagickResetIterator() or MagickSetFirstImage() before calling this function to ensure that all the images in the wand's image list will be appended together.

The format of the MagickAppendImages method is:

MagickWand *MagickAppendImages(MagickWand *wand,
  const MagickBooleanType stack)

A description of each parameter follows:

wand
the magick wand.
stack
By default, images are stacked left-to-right. Set stack to MagickTrue to stack them top-to-bottom.

MagickAutoGammaImage

MagickAutoGammaImage() extracts the 'mean' from the image and adjust the image to try make set its gamma appropriatally.

The format of the MagickAutoGammaImage method is:

MagickBooleanType MagickAutoGammaImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickAutoLevelImage

MagickAutoLevelImage() adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.

The format of the MagickAutoLevelImage method is:

MagickBooleanType MagickAutoLevelImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickAutoOrientImage

MagickAutoOrientImage() adjusts an image so that its orientation is suitable $ for viewing (i.e. top-left orientation).

The format of the MagickAutoOrientImage method is:

MagickBooleanType MagickAutoOrientImage(MagickWand *image)

A description of each parameter follows:

wand
the magick wand.

MagickBlackThresholdImage

MagickBlackThresholdImage() is like MagickThresholdImage() but forces all pixels below the threshold into black while leaving all pixels above the threshold unchanged.

The format of the MagickBlackThresholdImage method is:

MagickBooleanType MagickBlackThresholdImage(MagickWand *wand,
  const PixelWand *threshold)

A description of each parameter follows:

wand
the magick wand.
threshold
the pixel wand.

MagickBlueShiftImage

MagickBlueShiftImage() mutes the colors of the image to simulate a scene at nighttime in the moonlight.

The format of the MagickBlueShiftImage method is:

MagickBooleanType MagickBlueShiftImage(MagickWand *wand,
  const double factor)

A description of each parameter follows:

wand
the magick wand.
factor
the blue shift factor (default 1.5)

MagickBlurImage

MagickBlurImage() blurs an image. We convolve the image with a gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and BlurImage() selects a suitable radius for you.

The format of the MagickBlurImage method is:

MagickBooleanType MagickBlurImage(MagickWand *wand,const double radius,
  const double sigma)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the , in pixels, not counting the center pixel.
sigma
the standard deviation of the , in pixels.

MagickBorderImage

MagickBorderImage() surrounds the image with a border of the color defined by the bordercolor pixel wand.

The format of the MagickBorderImage method is:

MagickBooleanType MagickBorderImage(MagickWand *wand,
  const PixelWand *bordercolor,const size_t width,
  const size_t height,const CompositeOperator compose)

A description of each parameter follows:

wand
the magick wand.
bordercolor
the border color pixel wand.
width
the border width.
height
the border height.
compose
the composite operator.

Use MagickBrightnessContrastImage

Use MagickBrightnessContrastImage() to change the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image.

The format of the MagickBrightnessContrastImage method is:

MagickBooleanType MagickBrightnessContrastImage(MagickWand *wand,
  const double brightness,const double contrast)

A description of each parameter follows:

wand
the magick wand.
brightness
the brightness percent (-100 .. 100).
contrast
the contrast percent (-100 .. 100).

MagickChannelFxImage

MagickChannelFxImage() applies a channel expression to the specified image. The expression consists of one or more channels, either mnemonic or numeric (e.g. red, 1), separated by actions as follows:

<=> exchange two channels (e.g. red<=>blue) => transfer a channel to another (e.g. red=>green) , separate channel operations (e.g. red, green) | read channels from next input image (e.g. red | green) ; write channels to next output image (e.g. red; green; blue)
A channel without a operation symbol implies extract. For example, to create 3 grayscale images from the red, green, and blue channels of an image, use:
    -channel-fx "red; green; blue"

The format of the MagickChannelFxImage method is:

MagickWand *MagickChannelFxImage(MagickWand *wand,const char *expression)

A description of each parameter follows:

wand
the magick wand.
expression
the expression.

MagickCharcoalImage

MagickCharcoalImage() simulates a charcoal drawing.

The format of the MagickCharcoalImage method is:

MagickBooleanType MagickCharcoalImage(MagickWand *wand,
  const double radius,const double sigma)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.

MagickChopImage

MagickChopImage() removes a region of an image and collapses the image to occupy the removed portion

The format of the MagickChopImage method is:

MagickBooleanType MagickChopImage(MagickWand *wand,
  const size_t width,const size_t height,const ssize_t x,
  const ssize_t y)

A description of each parameter follows:

wand
the magick wand.
width
the region width.
height
the region height.
x
the region x offset.
y
the region y offset.

MagickClampImage

MagickClampImage() restricts the color range from 0 to the quantum depth.

The format of the MagickClampImage method is:

MagickBooleanType MagickClampImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.
channel
the channel.

MagickClipImage

MagickClipImage() clips along the first path from the 8BIM profile, if present.

The format of the MagickClipImage method is:

MagickBooleanType MagickClipImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickClipImagePath

MagickClipImagePath() clips along the named paths from the 8BIM profile, if present. Later operations take effect inside the path. Id may be a number if preceded with #, to work on a numbered path, e.g., "#1" to use the first path.

The format of the MagickClipImagePath method is:

MagickBooleanType MagickClipImagePath(MagickWand *wand,
  const char *pathname,const MagickBooleanType inside)

A description of each parameter follows:

wand
the magick wand.
pathname
name of clipping path resource. If name is preceded by #, use clipping path numbered by name.
inside
if non-zero, later operations take effect inside clipping path. Otherwise later operations take effect outside clipping path.

MagickClutImage

MagickClutImage() replaces colors in the image from a color lookup table.

The format of the MagickClutImage method is:

MagickBooleanType MagickClutImage(MagickWand *wand,
  const MagickWand *clut_wand,const PixelInterpolateMethod method)

A description of each parameter follows:

wand
the magick wand.
clut_image
the clut image.
method
the pixel interpolation method.

MagickCoalesceImages

MagickCoalesceImages() composites a set of images while respecting any page offsets and disposal methods. GIF, MIFF, and MNG animation sequences typically start with an image background and each subsequent image varies in size and offset. MagickCoalesceImages() returns a new sequence where each image in the sequence is the same size as the first and composited with the next image in the sequence.

The format of the MagickCoalesceImages method is:

MagickWand *MagickCoalesceImages(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickColorDecisionListImage

MagickColorDecisionListImage() accepts a lightweight Color Correction Collection (CCC) file which solely contains one or more color corrections and applies the color correction to the image. Here is a sample CCC file:

    <ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2">
    <ColorCorrection id="cc03345">
          <SOPNode>
               <Slope> 0.9 1.2 0.5 </Slope>
               <Offset> 0.4 -0.5 0.6 </Offset>
               <Power> 1.0 0.8 1.5 </Power>
          </SOPNode>
          <SATNode>
               <Saturation> 0.85 </Saturation>
          </SATNode>
    </ColorCorrection>
    </ColorCorrectionCollection>

which includes the offset, slope, and power for each of the RGB channels as well as the saturation.

The format of the MagickColorDecisionListImage method is:

MagickBooleanType MagickColorDecisionListImage(MagickWand *wand,
  const char *color_correction_collection)

A description of each parameter follows:

wand
the magick wand.
color_correction_collection
the color correction collection in XML.

MagickColorizeImage

MagickColorizeImage() blends the fill color with each pixel in the image.

The format of the MagickColorizeImage method is:

MagickBooleanType MagickColorizeImage(MagickWand *wand,
  const PixelWand *colorize,const PixelWand *blend)

A description of each parameter follows:

wand
the magick wand.
colorize
the colorize pixel wand.
alpha
the alpha pixel wand.

MagickColorMatrixImage

MagickColorMatrixImage() apply color transformation to an image. The method permits saturation changes, hue rotation, luminance to alpha, and various other effects. Although variable-sized transformation matrices can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA (or RGBA with offsets). The matrix is similar to those used by Adobe Flash except offsets are in column 6 rather than 5 (in support of CMYKA images) and offsets are normalized (divide Flash offset by 255).

The format of the MagickColorMatrixImage method is:

MagickBooleanType MagickColorMatrixImage(MagickWand *wand,
  const KernelInfo *color_matrix)

A description of each parameter follows:

wand
the magick wand.
color_matrix
the color matrix.

MagickCombineImages

MagickCombineImages() combines one or more images into a single image. The grayscale value of the pixels of each image in the sequence is assigned in order to the specified hannels of the combined image. The typical ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc.

The format of the MagickCombineImages method is:

MagickWand *MagickCombineImages(MagickWand *wand,
  const ColorspaceType colorspace)

A description of each parameter follows:

wand
the magick wand.
colorspace
the colorspace.

MagickCommentImage

MagickCommentImage() adds a comment to your image.

The format of the MagickCommentImage method is:

MagickBooleanType MagickCommentImage(MagickWand *wand,
  const char *comment)

A description of each parameter follows:

wand
the magick wand.
comment
the image comment.

MagickCompareImagesLayers

MagickCompareImagesLayers() compares each image with the next in a sequence and returns the maximum bounding region of any pixel differences it discovers.

The format of the MagickCompareImagesLayers method is:

MagickWand *MagickCompareImagesLayers(MagickWand *wand,
  const LayerMethod method)

A description of each parameter follows:

wand
the magick wand.
method
the compare method.

MagickCompareImages

MagickCompareImages() compares an image to a reconstructed image and returns the specified difference image.

The format of the MagickCompareImages method is:

MagickWand *MagickCompareImages(MagickWand *wand,
  const MagickWand *reference,const MetricType metric,
  double *distortion)

A description of each parameter follows:

wand
the magick wand.
reference
the reference wand.
metric
the metric.
distortion
the computed distortion between the images.

MagickCompositeImage

MagickCompositeImage() composite one image onto another at the specified offset.

The format of the MagickCompositeImage method is:

MagickBooleanType MagickCompositeImage(MagickWand *wand,
  const MagickWand *source_wand,const CompositeOperator compose,
  const MagickBooleanType clip_to_self,const ssize_t x,const ssize_t y)

A description of each parameter follows:

wand
the magick wand holding the destination images
source_image
the magick wand holding source image.
compose
This operator affects how the composite is applied to the image. The default is Over. These are some of the compose methods availble.
OverCompositeOp InCompositeOp OutCompositeOp AtopCompositeOp XorCompositeOp PlusCompositeOp MinusCompositeOp AddCompositeOp SubtractCompositeOp DifferenceCompositeOp BumpmapCompositeOp CopyCompositeOp DisplaceCompositeOp
clip_to_self
set to MagickTrue to limit composition to area composed.
x
the column offset of the composited image.
y
the row offset of the composited image.

MagickCompositeImageGravity

MagickCompositeImageGravity() composite one image onto another using the specified gravity.

The format of the MagickCompositeImageGravity method is:

MagickBooleanType MagickCompositeImageGravity(MagickWand *wand,
  const MagickWand *source_wand,const CompositeOperator compose,
  const GravityType gravity)

A description of each parameter follows:

wand
the magick wand holding the destination images
source_image
the magick wand holding source image.
compose
This operator affects how the composite is applied to the image. The default is Over. These are some of the compose methods availble.
OverCompositeOp InCompositeOp OutCompositeOp AtopCompositeOp XorCompositeOp PlusCompositeOp MinusCompositeOp AddCompositeOp SubtractCompositeOp DifferenceCompositeOp BumpmapCompositeOp CopyCompositeOp DisplaceCompositeOp
gravity
positioning gravity (NorthWestGravity, NorthGravity, NorthEastGravity, WestGravity, CenterGravity, EastGravity, SouthWestGravity, SouthGravity, SouthEastGravity)

MagickCompositeLayers

MagickCompositeLayers() composite the images in the source wand over the images in the destination wand in sequence, starting with the current image in both lists.

Each layer from the two image lists are composted together until the end of one of the image lists is reached. The offset of each composition is also adjusted to match the virtual canvas offsets of each layer. As such the given offset is relative to the virtual canvas, and not the actual image.

Composition uses given x and y offsets, as the 'origin' location of the source images virtual canvas (not the real image) allowing you to compose a list of 'layer images' into the destiantioni images. This makes it well sutiable for directly composing 'Clears Frame Animations' or 'Coaleased Animations' onto a static or other 'Coaleased Animation' destination image list. GIF disposal handling is not looked at.

Special case:- If one of the image sequences is the last image (just a single image remaining), that image is repeatally composed with all the images in the other image list. Either the source or destination lists may be the single image, for this situation.

In the case of a single destination image (or last image given), that image will ve cloned to match the number of images remaining in the source image list.

This is equivelent to the "-layer Composite" Shell API operator.

The format of the MagickCompositeLayers method is:

MagickBooleanType MagickCompositeLayers(MagickWand *wand,
  const MagickWand *source_wand, const CompositeOperator compose,
  const ssize_t x,const ssize_t y)

A description of each parameter follows:

wand
the magick wand holding destaintion images
source_wand
the wand holding the source images
compose, x, y
composition arguments

MagickContrastImage

MagickContrastImage() enhances the intensity differences between the lighter and darker elements of the image. Set sharpen to a value other than 0 to increase the image contrast otherwise the contrast is reduced.

The format of the MagickContrastImage method is:

MagickBooleanType MagickContrastImage(MagickWand *wand,
  const MagickBooleanType sharpen)

A description of each parameter follows:

wand
the magick wand.
sharpen
Increase or decrease image contrast.

MagickContrastStretchImage

MagickContrastStretchImage() enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available. You can also reduce the influence of a particular channel with a gamma value of 0.

The format of the MagickContrastStretchImage method is:

MagickBooleanType MagickContrastStretchImage(MagickWand *wand,
  const double black_point,const double white_point)

A description of each parameter follows:

wand
the magick wand.
black_point
the black point.
white_point
the white point.

MagickConvolveImage

MagickConvolveImage() applies a custom convolution kernel to the image.

The format of the MagickConvolveImage method is:

MagickBooleanType MagickConvolveImage(MagickWand *wand,
  const KernelInfo *kernel)

A description of each parameter follows:

wand
the magick wand.
kernel
An array of doubles representing the convolution kernel.

MagickCropImage

MagickCropImage() extracts a region of the image.

The format of the MagickCropImage method is:

MagickBooleanType MagickCropImage(MagickWand *wand,
  const size_t width,const size_t height,const ssize_t x,const ssize_t y)

A description of each parameter follows:

wand
the magick wand.
width
the region width.
height
the region height.
x
the region x-offset.
y
the region y-offset.

MagickCycleColormapImage

MagickCycleColormapImage() displaces an image's colormap by a given number of positions. If you cycle the colormap a number of times you can produce a psychodelic effect.

The format of the MagickCycleColormapImage method is:

MagickBooleanType MagickCycleColormapImage(MagickWand *wand,
  const ssize_t displace)

A description of each parameter follows:

wand
the magick wand.
pixel_wand
the pixel wand.

MagickConstituteImage

MagickConstituteImage() adds an image to the wand comprised of the pixel data you supply. The pixel data must be in scanline order top-to-bottom. The data can be char, short int, int, float, or double. Float and double require the pixels to be normalized [0..1], otherwise [0..Max], where Max is the maximum value the type can accomodate (e.g. 255 for char). For example, to create a 640x480 image from unsigned red-green-blue character data, use

MagickConstituteImage(wand,640,480,"RGB",CharPixel,pixels);

The format of the MagickConstituteImage method is:

MagickBooleanType MagickConstituteImage(MagickWand *wand,
  const size_t columns,const size_t rows,const char *map,
  const StorageType storage,void *pixels)

A description of each parameter follows:

wand
the magick wand.
columns
width in pixels of the image.
rows
height in pixels of the image.
map
This string reflects the expected ordering of the pixel array. It can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad.
storage
Define the data type of the pixels. Float and double types are expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from these types: CharPixel, DoublePixel, FloatPixel, IntegerPixel, LongPixel, QuantumPixel, or ShortPixel.
pixels
This array of values contain the pixel components as defined by map and type. You must preallocate this array where the expected length varies depending on the values of width, height, map, and type.

MagickDecipherImage

MagickDecipherImage() converts cipher pixels to plain pixels.

The format of the MagickDecipherImage method is:

MagickBooleanType MagickDecipherImage(MagickWand *wand,
  const char *passphrase)

A description of each parameter follows:

wand
the magick wand.
passphrase
the passphrase.

MagickDeconstructImages

MagickDeconstructImages() compares each image with the next in a sequence and returns the maximum bounding region of any pixel differences it discovers.

The format of the MagickDeconstructImages method is:

MagickWand *MagickDeconstructImages(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickDeskewImage

MagickDeskewImage() removes skew from the image. Skew is an artifact that occurs in scanned images because of the camera being misaligned, imperfections in the scanning or surface, or simply because the paper was not placed completely flat when scanned.

The format of the MagickDeskewImage method is:

MagickBooleanType MagickDeskewImage(MagickWand *wand,
  const double threshold)

A description of each parameter follows:

wand
the magick wand.
threshold
separate background from foreground.

MagickDespeckleImage

MagickDespeckleImage() reduces the speckle noise in an image while perserving the edges of the original image.

The format of the MagickDespeckleImage method is:

MagickBooleanType MagickDespeckleImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickDestroyImage

MagickDestroyImage() dereferences an image, deallocating memory associated with the image if the reference count becomes zero.

The format of the MagickDestroyImage method is:

Image *MagickDestroyImage(Image *image)

A description of each parameter follows:

image
the image.

MagickDisplayImage

MagickDisplayImage() displays an image.

The format of the MagickDisplayImage method is:

MagickBooleanType MagickDisplayImage(MagickWand *wand,
  const char *server_name)

A description of each parameter follows:

wand
the magick wand.
server_name
the X server name.

MagickDisplayImages

MagickDisplayImages() displays an image or image sequence.

The format of the MagickDisplayImages method is:

MagickBooleanType MagickDisplayImages(MagickWand *wand,
  const char *server_name)

A description of each parameter follows:

wand
the magick wand.
server_name
the X server name.

MagickDistortImage

MagickDistortImage() distorts an image using various distortion methods, by mapping color lookups of the source image to a new destination image usally of the same size as the source image, unless 'bestfit' is set to true.

If 'bestfit' is enabled, and distortion allows it, the destination image is adjusted to ensure the whole source 'image' will just fit within the final destination image, which will be sized and offset accordingly. Also in many cases the virtual offset of the source image will be taken into account in the mapping.

The format of the MagickDistortImage method is:

MagickBooleanType MagickDistortImage(MagickWand *wand,
  const DistortImageMethod method,const size_t number_arguments,
  const double *arguments,const MagickBooleanType bestfit)

A description of each parameter follows:

image
the image to be distorted.
method
the method of image distortion.
ArcDistortion always ignores the source image offset, and always 'bestfit' the destination image with the top left corner offset relative to the polar mapping center.
Bilinear has no simple inverse mapping so it does not allow 'bestfit' style of image distortion.
Affine, Perspective, and Bilinear, do least squares fitting of the distortion when more than the minimum number of control point pairs are provided.
Perspective, and Bilinear, falls back to a Affine distortion when less that 4 control point pairs are provided. While Affine distortions let you use any number of control point pairs, that is Zero pairs is a no-Op (viewport only) distrotion, one pair is a translation and two pairs of control points do a scale-rotate-translate, without any shearing.
number_arguments
the number of arguments given for this distortion method.
arguments
the arguments for this distortion method.
bestfit
Attempt to resize destination to fit distorted source.

MagickDrawImage

MagickDrawImage() renders the drawing wand on the current image.

The format of the MagickDrawImage method is:

MagickBooleanType MagickDrawImage(MagickWand *wand,
  const DrawingWand *drawing_wand)

A description of each parameter follows:

wand
the magick wand.
drawing_wand
the draw wand.

MagickEdgeImage

MagickEdgeImage() enhance edges within the image with a convolution filter of the given radius. Use a radius of 0 and Edge() selects a suitable radius for you.

The format of the MagickEdgeImage method is:

MagickBooleanType MagickEdgeImage(MagickWand *wand,const double radius)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the pixel neighborhood.

MagickEmbossImage

MagickEmbossImage() returns a grayscale image with a three-dimensional effect. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and Emboss() selects a suitable radius for you.

The format of the MagickEmbossImage method is:

MagickBooleanType MagickEmbossImage(MagickWand *wand,const double radius,
  const double sigma)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.

MagickEncipherImage

MagickEncipherImage() converts plaint pixels to cipher pixels.

The format of the MagickEncipherImage method is:

MagickBooleanType MagickEncipherImage(MagickWand *wand,
  const char *passphrase)

A description of each parameter follows:

wand
the magick wand.
passphrase
the passphrase.

MagickEnhanceImage

MagickEnhanceImage() applies a digital filter that improves the quality of a noisy image.

The format of the MagickEnhanceImage method is:

MagickBooleanType MagickEnhanceImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickEqualizeImage

MagickEqualizeImage() equalizes the image histogram.

The format of the MagickEqualizeImage method is:

MagickBooleanType MagickEqualizeImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.
channel
the image channel(s).

MagickEvaluateImage

MagickEvaluateImage() applys an arithmetic, relational, or logical expression to an image. Use these operators to lighten or darken an image, to increase or decrease contrast in an image, or to produce the "negative" of an image.

The format of the MagickEvaluateImage method is:

MagickBooleanType MagickEvaluateImage(MagickWand *wand,
  const MagickEvaluateOperator operator,const double value)
MagickBooleanType MagickEvaluateImages(MagickWand *wand,
  const MagickEvaluateOperator operator)

A description of each parameter follows:

wand
the magick wand.
op
A channel operator.
value
A value value.

MagickExportImagePixels

MagickExportImagePixels() extracts pixel data from an image and returns it to you. The method returns MagickTrue on success otherwise MagickFalse if an error is encountered. The data is returned as char, short int, int, ssize_t, float, or double in the order specified by map.

Suppose you want to extract the first scanline of a 640x480 image as character data in red-green-blue order:

MagickExportImagePixels(wand,0,0,640,1,"RGB",CharPixel,pixels);

The format of the MagickExportImagePixels method is:

MagickBooleanType MagickExportImagePixels(MagickWand *wand,
  const ssize_t x,const ssize_t y,const size_t columns,
  const size_t rows,const char *map,const StorageType storage,
  void *pixels)

A description of each parameter follows:

wand
the magick wand.
x, y, columns, rows
These values define the perimeter of a region of pixels you want to extract.
map
This string reflects the expected ordering of the pixel array. It can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad.
storage
Define the data type of the pixels. Float and double types are expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from these types: CharPixel, DoublePixel, FloatPixel, IntegerPixel, LongPixel, QuantumPixel, or ShortPixel.
pixels
This array of values contain the pixel components as defined by map and type. You must preallocate this array where the expected length varies depending on the values of width, height, map, and type.

MagickExtentImage

MagickExtentImage() extends the image as defined by the geometry, gravity, and wand background color. Set the (x,y) offset of the geometry to move the original wand relative to the extended wand.

The format of the MagickExtentImage method is:

MagickBooleanType MagickExtentImage(MagickWand *wand,const size_t width,
  const size_t height,const ssize_t x,const ssize_t y)

A description of each parameter follows:

wand
the magick wand.
width
the region width.
height
the region height.
x
the region x offset.
y
the region y offset.

MagickFlipImage

MagickFlipImage() creates a vertical mirror image by reflecting the pixels around the central x-axis.

The format of the MagickFlipImage method is:

MagickBooleanType MagickFlipImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickFloodfillPaintImage

MagickFloodfillPaintImage() changes the color value of any pixel that matches target and is an immediate neighbor. If the method FillToBorderMethod is specified, the color value is changed for any neighbor pixel that does not match the bordercolor member of image.

The format of the MagickFloodfillPaintImage method is:

MagickBooleanType MagickFloodfillPaintImage(MagickWand *wand,
  const PixelWand *fill,const double fuzz,const PixelWand *bordercolor,
  const ssize_t x,const ssize_t y,const MagickBooleanType invert)

A description of each parameter follows:

wand
the magick wand.
fill
the floodfill color pixel wand.
fuzz
By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.
bordercolor
the border color pixel wand.
x,y
the starting location of the operation.
invert
paint any pixel that does not match the target color.

MagickFlopImage

MagickFlopImage() creates a horizontal mirror image by reflecting the pixels around the central y-axis.

The format of the MagickFlopImage method is:

MagickBooleanType MagickFlopImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickForwardFourierTransformImage

MagickForwardFourierTransformImage() implements the discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

The format of the MagickForwardFourierTransformImage method is:

MagickBooleanType MagickForwardFourierTransformImage(MagickWand *wand,
  const MagickBooleanType magnitude)

A description of each parameter follows:

wand
the magick wand.
magnitude
if true, return as magnitude / phase pair otherwise a real / imaginary image pair.

MagickFrameImage

MagickFrameImage() adds a simulated three-dimensional border around the image. The width and height specify the border width of the vertical and horizontal sides of the frame. The inner and outer bevels indicate the width of the inner and outer shadows of the frame.

The format of the MagickFrameImage method is:

MagickBooleanType MagickFrameImage(MagickWand *wand,
  const PixelWand *matte_color,const size_t width,
  const size_t height,const ssize_t inner_bevel,
  const ssize_t outer_bevel,const CompositeOperator compose)

A description of each parameter follows:

wand
the magick wand.
matte_color
the frame color pixel wand.
width
the border width.
height
the border height.
inner_bevel
the inner bevel width.
outer_bevel
the outer bevel width.
compose
the composite operator.

MagickFunctionImage

MagickFunctionImage() applys an arithmetic, relational, or logical expression to an image. Use these operators to lighten or darken an image, to increase or decrease contrast in an image, or to produce the "negative" of an image.

The format of the MagickFunctionImage method is:

MagickBooleanType MagickFunctionImage(MagickWand *wand,
  const MagickFunction function,const size_t number_arguments,
  const double *arguments)

A description of each parameter follows:

wand
the magick wand.
function
the image function.
number_arguments
the number of function arguments.
arguments
the function arguments.

MagickFxImage

MagickFxImage() evaluate expression for each pixel in the image.

The format of the MagickFxImage method is:

MagickWand *MagickFxImage(MagickWand *wand,const char *expression)

A description of each parameter follows:

wand
the magick wand.
expression
the expression.

MagickGammaImage

MagickGammaImage() gamma-corrects an image. The same image viewed on different devices will have perceptual differences in the way the image's intensities are represented on the screen. Specify individual gamma levels for the red, green, and blue channels, or adjust all three with the gamma parameter. Values typically range from 0.8 to 2.3.

You can also reduce the influence of a particular channel with a gamma value of 0.

The format of the MagickGammaImage method is:

MagickBooleanType MagickGammaImage(MagickWand *wand,const double gamma)

A description of each parameter follows:

wand
the magick wand.
level
Define the level of gamma correction.

MagickGaussianBlurImage

MagickGaussianBlurImage() blurs an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and MagickGaussianBlurImage() selects a suitable radius for you.

The format of the MagickGaussianBlurImage method is:

MagickBooleanType MagickGaussianBlurImage(MagickWand *wand,
  const double radius,const double sigma)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.

MagickGetImage

MagickGetImage() gets the image at the current image index.

The format of the MagickGetImage method is:

MagickWand *MagickGetImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageAlphaChannel

MagickGetImageAlphaChannel() returns MagickFalse if the image alpha channel is not activated. That is, the image is RGB rather than RGBA or CMYK rather than CMYKA.

The format of the MagickGetImageAlphaChannel method is:

MagickBooleanType MagickGetImageAlphaChannel(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageMask

MagickGetImageMask() gets the image clip mask at the current image index.

The format of the MagickGetImageMask method is:

MagickWand *MagickGetImageMask(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageBackgroundColor

MagickGetImageBackgroundColor() returns the image background color.

The format of the MagickGetImageBackgroundColor method is:

MagickBooleanType MagickGetImageBackgroundColor(MagickWand *wand,
  PixelWand *background_color)

A description of each parameter follows:

wand
the magick wand.
background_color
Return the background color.

MagickGetImageBlob

MagickGetImageBlob() implements direct to memory image formats. It returns the image as a blob (a formatted "file" in memory) and its length, starting from the current position in the image sequence. Use MagickSetImageFormat() to set the format to write to the blob (GIF, JPEG, PNG, etc.).

Utilize MagickResetIterator() to ensure the write is from the beginning of the image sequence.

Use MagickRelinquishMemory() to free the blob when you are done with it.

The format of the MagickGetImageBlob method is:

unsigned char *MagickGetImageBlob(MagickWand *wand,size_t *length)

A description of each parameter follows:

wand
the magick wand.
length
the length of the blob.

MagickGetImageBlob

MagickGetImageBlob() implements direct to memory image formats. It returns the image sequence as a blob and its length. The format of the image determines the format of the returned blob (GIF, JPEG, PNG, etc.). To return a different image format, use MagickSetImageFormat().

Note, some image formats do not permit multiple images to the same image stream (e.g. JPEG). in this instance, just the first image of the sequence is returned as a blob.

The format of the MagickGetImagesBlob method is:

unsigned char *MagickGetImagesBlob(MagickWand *wand,size_t *length)

A description of each parameter follows:

wand
the magick wand.
length
the length of the blob.

MagickGetImageBluePrimary

MagickGetImageBluePrimary() returns the chromaticy blue primary point for the image.

The format of the MagickGetImageBluePrimary method is:

MagickBooleanType MagickGetImageBluePrimary(MagickWand *wand,double *x,
  double *y)

A description of each parameter follows:

wand
the magick wand.
x
the chromaticity blue primary x-point.
y
the chromaticity blue primary y-point.

MagickGetImageBorderColor

MagickGetImageBorderColor() returns the image border color.

The format of the MagickGetImageBorderColor method is:

MagickBooleanType MagickGetImageBorderColor(MagickWand *wand,
  PixelWand *border_color)

A description of each parameter follows:

wand
the magick wand.
border_color
Return the border color.

MagickGetImageFeatures

MagickGetImageFeatures() returns features for each channel in the image in each of four directions (horizontal, vertical, left and right diagonals) for the specified distance. The features include the angular second moment, contrast, correlation, sum of squares: variance, inverse difference moment, sum average, sum varience, sum entropy, entropy, difference variance, difference entropy, information measures of correlation 1, information measures of correlation 2, and maximum correlation coefficient. You can access the red channel contrast, for example, like this:

channel_features=MagickGetImageFeatures(wand,1);
contrast=channel_features[RedPixelChannel].contrast[0];

Use MagickRelinquishMemory() to free the statistics buffer.

The format of the MagickGetImageFeatures method is:

ChannelFeatures *MagickGetImageFeatures(MagickWand *wand,
  const size_t distance)

A description of each parameter follows:

wand
the magick wand.
distance
the distance.

MagickGetImageKurtosis

MagickGetImageKurtosis() gets the kurtosis and skewness of one or more image channels.

The format of the MagickGetImageKurtosis method is:

MagickBooleanType MagickGetImageKurtosis(MagickWand *wand,
  double *kurtosis,double *skewness)

A description of each parameter follows:

wand
the magick wand.
kurtosis
The kurtosis for the specified channel(s).
skewness
The skewness for the specified channel(s).

MagickGetImageMean

MagickGetImageMean() gets the mean and standard deviation of one or more image channels.

The format of the MagickGetImageMean method is:

MagickBooleanType MagickGetImageMean(MagickWand *wand,double *mean,
  double *standard_deviation)

A description of each parameter follows:

wand
the magick wand.
channel
the image channel(s).
mean
The mean pixel value for the specified channel(s).
standard_deviation
The standard deviation for the specified channel(s).

MagickGetImageRange

MagickGetImageRange() gets the range for one or more image channels.

The format of the MagickGetImageRange method is:

MagickBooleanType MagickGetImageRange(MagickWand *wand,double *minima,
  double *maxima)

A description of each parameter follows:

wand
the magick wand.
minima
The minimum pixel value for the specified channel(s).
maxima
The maximum pixel value for the specified channel(s).

MagickGetImageStatistics

MagickGetImageStatistics() returns statistics for each channel in the image. The statistics include the channel depth, its minima and maxima, the mean, the standard deviation, the kurtosis and the skewness. You can access the red channel mean, for example, like this:

channel_statistics=MagickGetImageStatistics(wand);
red_mean=channel_statistics[RedPixelChannel].mean;

Use MagickRelinquishMemory() to free the statistics buffer.

The format of the MagickGetImageStatistics method is:

ChannelStatistics *MagickGetImageStatistics(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageColormapColor

MagickGetImageColormapColor() returns the color of the specified colormap index.

The format of the MagickGetImageColormapColor method is:

MagickBooleanType MagickGetImageColormapColor(MagickWand *wand,
  const size_t index,PixelWand *color)

A description of each parameter follows:

wand
the magick wand.
index
the offset into the image colormap.
color
Return the colormap color in this wand.

MagickGetImageColors

MagickGetImageColors() gets the number of unique colors in the image.

The format of the MagickGetImageColors method is:

size_t MagickGetImageColors(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageColorspace

MagickGetImageColorspace() gets the image colorspace.

The format of the MagickGetImageColorspace method is:

ColorspaceType MagickGetImageColorspace(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageCompose

MagickGetImageCompose() returns the composite operator associated with the image.

The format of the MagickGetImageCompose method is:

CompositeOperator MagickGetImageCompose(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageCompression

MagickGetImageCompression() gets the image compression.

The format of the MagickGetImageCompression method is:

CompressionType MagickGetImageCompression(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageCompressionQuality

MagickGetImageCompressionQuality() gets the image compression quality.

The format of the MagickGetImageCompressionQuality method is:

size_t MagickGetImageCompressionQuality(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageDelay

MagickGetImageDelay() gets the image delay.

The format of the MagickGetImageDelay method is:

size_t MagickGetImageDelay(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageDepth

MagickGetImageDepth() gets the image depth.

The format of the MagickGetImageDepth method is:

size_t MagickGetImageDepth(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageDispose

MagickGetImageDispose() gets the image disposal method.

The format of the MagickGetImageDispose method is:

DisposeType MagickGetImageDispose(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageDistortion

MagickGetImageDistortion() compares an image to a reconstructed image and returns the specified distortion metric.

The format of the MagickGetImageDistortion method is:

MagickBooleanType MagickGetImageDistortion(MagickWand *wand,
  const MagickWand *reference,const MetricType metric,
  double *distortion)

A description of each parameter follows:

wand
the magick wand.
reference
the reference wand.
metric
the metric.
distortion
the computed distortion between the images.

MagickGetImageDistortions

MagickGetImageDistortions() compares one or more pixel channels of an image to a reconstructed image and returns the specified distortion metrics.

Use MagickRelinquishMemory() to free the metrics when you are done with them.

The format of the MagickGetImageDistortion method is:

double *MagickGetImageDistortion(MagickWand *wand,
  const MagickWand *reference,const MetricType metric)

A description of each parameter follows:

wand
the magick wand.
reference
the reference wand.
metric
the metric.

MagickGetImageEndian

MagickGetImageEndian() gets the image endian.

The format of the MagickGetImageEndian method is:

EndianType MagickGetImageEndian(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageFilename

MagickGetImageFilename() returns the filename of a particular image in a sequence.

The format of the MagickGetImageFilename method is:

char *MagickGetImageFilename(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageFormat

MagickGetImageFormat() returns the format of a particular image in a sequence.

The format of the MagickGetImageFormat method is:

char *MagickGetImageFormat(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageFuzz

MagickGetImageFuzz() gets the image fuzz.

The format of the MagickGetImageFuzz method is:

double MagickGetImageFuzz(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageGamma

MagickGetImageGamma() gets the image gamma.

The format of the MagickGetImageGamma method is:

double MagickGetImageGamma(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageGravity

MagickGetImageGravity() gets the image gravity.

The format of the MagickGetImageGravity method is:

GravityType MagickGetImageGravity(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageGreenPrimary

MagickGetImageGreenPrimary() returns the chromaticy green primary point.

The format of the MagickGetImageGreenPrimary method is:

MagickBooleanType MagickGetImageGreenPrimary(MagickWand *wand,double *x,
  double *y)

A description of each parameter follows:

wand
the magick wand.
x
the chromaticity green primary x-point.
y
the chromaticity green primary y-point.

MagickGetImageHeight

MagickGetImageHeight() returns the image height.

The format of the MagickGetImageHeight method is:

size_t MagickGetImageHeight(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageHistogram

MagickGetImageHistogram() returns the image histogram as an array of PixelWand wands.

The format of the MagickGetImageHistogram method is:

PixelWand **MagickGetImageHistogram(MagickWand *wand,
  size_t *number_colors)

A description of each parameter follows:

wand
the magick wand.
number_colors
the number of unique colors in the image and the number of pixel wands returned.

MagickGetImageInterlaceScheme

MagickGetImageInterlaceScheme() gets the image interlace scheme.

The format of the MagickGetImageInterlaceScheme method is:

InterlaceType MagickGetImageInterlaceScheme(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageInterpolateMethod

MagickGetImageInterpolateMethod() returns the interpolation method for the sepcified image.

The format of the MagickGetImageInterpolateMethod method is:

PixelInterpolateMethod MagickGetImagePixelInterpolateMethod(
  MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageIterations

MagickGetImageIterations() gets the image iterations.

The format of the MagickGetImageIterations method is:

size_t MagickGetImageIterations(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageLength

MagickGetImageLength() returns the image length in bytes.

The format of the MagickGetImageLength method is:

MagickBooleanType MagickGetImageLength(MagickWand *wand,
  MagickSizeType *length)

A description of each parameter follows:

wand
the magick wand.
length
the image length in bytes.

MagickGetImageMatteColor

MagickGetImageMatteColor() returns the image matte color.

The format of the MagickGetImageMatteColor method is:

MagickBooleanType MagickGetImagematteColor(MagickWand *wand,
  PixelWand *matte_color)

A description of each parameter follows:

wand
the magick wand.
matte_color
Return the matte color.

MagickGetImageOrientation

MagickGetImageOrientation() returns the image orientation.

The format of the MagickGetImageOrientation method is:

OrientationType MagickGetImageOrientation(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImagePage

MagickGetImagePage() returns the page geometry associated with the image.

The format of the MagickGetImagePage method is:

MagickBooleanType MagickGetImagePage(MagickWand *wand,
  size_t *width,size_t *height,ssize_t *x,ssize_t *y)

A description of each parameter follows:

wand
the magick wand.
width
the page width.
height
the page height.
x
the page x-offset.
y
the page y-offset.

MagickGetImagePixelColor

MagickGetImagePixelColor() returns the color of the specified pixel.

The format of the MagickGetImagePixelColor method is:

MagickBooleanType MagickGetImagePixelColor(MagickWand *wand,
  const ssize_t x,const ssize_t y,PixelWand *color)

A description of each parameter follows:

wand
the magick wand.
x,y
the pixel offset into the image.
color
Return the colormap color in this wand.

MagickGetImageRedPrimary

MagickGetImageRedPrimary() returns the chromaticy red primary point.

The format of the MagickGetImageRedPrimary method is:

MagickBooleanType MagickGetImageRedPrimary(MagickWand *wand,double *x,
  double *y)

A description of each parameter follows:

wand
the magick wand.
x
the chromaticity red primary x-point.
y
the chromaticity red primary y-point.

MagickGetImageRegion

MagickGetImageRegion() extracts a region of the image and returns it as a a new wand.

The format of the MagickGetImageRegion method is:

MagickWand *MagickGetImageRegion(MagickWand *wand,
  const size_t width,const size_t height,const ssize_t x,
  const ssize_t y)

A description of each parameter follows:

wand
the magick wand.
width
the region width.
height
the region height.
x
the region x offset.
y
the region y offset.

MagickGetImageRenderingIntent

MagickGetImageRenderingIntent() gets the image rendering intent.

The format of the MagickGetImageRenderingIntent method is:

RenderingIntent MagickGetImageRenderingIntent(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageResolution

MagickGetImageResolution() gets the image X and Y resolution.

The format of the MagickGetImageResolution method is:

MagickBooleanType MagickGetImageResolution(MagickWand *wand,double *x,
  double *y)

A description of each parameter follows:

wand
the magick wand.
x
the image x-resolution.
y
the image y-resolution.

MagickGetImageScene

MagickGetImageScene() gets the image scene.

The format of the MagickGetImageScene method is:

size_t MagickGetImageScene(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageSignature

MagickGetImageSignature() generates an SHA-256 message digest for the image pixel stream.

The format of the MagickGetImageSignature method is:

char *MagickGetImageSignature(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageTicksPerSecond

MagickGetImageTicksPerSecond() gets the image ticks-per-second.

The format of the MagickGetImageTicksPerSecond method is:

size_t MagickGetImageTicksPerSecond(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageType

MagickGetImageType() gets the potential image type:

Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte

The format of the MagickGetImageType method is:

ImageType MagickGetImageType(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageUnits

MagickGetImageUnits() gets the image units of resolution.

The format of the MagickGetImageUnits method is:

ResolutionType MagickGetImageUnits(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageVirtualPixelMethod

MagickGetImageVirtualPixelMethod() returns the virtual pixel method for the sepcified image.

The format of the MagickGetImageVirtualPixelMethod method is:

VirtualPixelMethod MagickGetImageVirtualPixelMethod(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageWhitePoint

MagickGetImageWhitePoint() returns the chromaticy white point.

The format of the MagickGetImageWhitePoint method is:

MagickBooleanType MagickGetImageWhitePoint(MagickWand *wand,double *x,
  double *y)

A description of each parameter follows:

wand
the magick wand.
x
the chromaticity white x-point.
y
the chromaticity white y-point.

MagickGetImageWidth

MagickGetImageWidth() returns the image width.

The format of the MagickGetImageWidth method is:

size_t MagickGetImageWidth(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetNumberImages

MagickGetNumberImages() returns the number of images associated with a magick wand.

The format of the MagickGetNumberImages method is:

size_t MagickGetNumberImages(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetImageTotalInkDensity

MagickGetImageTotalInkDensity() gets the image total ink density.

The format of the MagickGetImageTotalInkDensity method is:

double MagickGetImageTotalInkDensity(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickHaldClutImage

MagickHaldClutImage() replaces colors in the image from a Hald color lookup table. A Hald color lookup table is a 3-dimensional color cube mapped to 2 dimensions. Create it with the HALD coder. You can apply any color transformation to the Hald image and then use this method to apply the transform to the image.

The format of the MagickHaldClutImage method is:

MagickBooleanType MagickHaldClutImage(MagickWand *wand,
  const MagickWand *hald_wand)

A description of each parameter follows:

wand
the magick wand.
hald_image
the hald CLUT image.

MagickHasNextImage

MagickHasNextImage() returns MagickTrue if the wand has more images when traversing the list in the forward direction

The format of the MagickHasNextImage method is:

MagickBooleanType MagickHasNextImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickHasPreviousImage

MagickHasPreviousImage() returns MagickTrue if the wand has more images when traversing the list in the reverse direction

The format of the MagickHasPreviousImage method is:

MagickBooleanType MagickHasPreviousImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickIdentifyImage

MagickIdentifyImage() identifies an image by printing its attributes to the file. Attributes include the image width, height, size, and others.

The format of the MagickIdentifyImage method is:

const char *MagickIdentifyImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickIdentifyImageType

MagickIdentifyImageType() gets the potential image type:

Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte

To ensure the image type matches its potential, use MagickSetImageType():

    (void) MagickSetImageType(wand,MagickIdentifyImageType(wand));

The format of the MagickIdentifyImageType method is:

ImageType MagickIdentifyImageType(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickImplodeImage

MagickImplodeImage() creates a new image that is a copy of an existing one with the image pixels "implode" by the specified percentage. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

The format of the MagickImplodeImage method is:

MagickBooleanType MagickImplodeImage(MagickWand *wand,
  const double radius,const PixelInterpolateMethod method)

A description of each parameter follows:

wand
the magick wand.
amount
Define the extent of the implosion.
method
the pixel interpolation method.

MagickImportImagePixels

MagickImportImagePixels() accepts pixel datand stores it in the image at the location you specify. The method returns MagickFalse on success otherwise MagickTrue if an error is encountered. The pixel data can be either char, short int, int, ssize_t, float, or double in the order specified by map.

Suppose your want to upload the first scanline of a 640x480 image from character data in red-green-blue order:

MagickImportImagePixels(wand,0,0,640,1,"RGB",CharPixel,pixels);

The format of the MagickImportImagePixels method is:

MagickBooleanType MagickImportImagePixels(MagickWand *wand,
  const ssize_t x,const ssize_t y,const size_t columns,
  const size_t rows,const char *map,const StorageType storage,
  const void *pixels)

A description of each parameter follows:

wand
the magick wand.
x, y, columns, rows
These values define the perimeter of a region of pixels you want to define.
map
This string reflects the expected ordering of the pixel array. It can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad.
storage
Define the data type of the pixels. Float and double types are expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from these types: CharPixel, ShortPixel, IntegerPixel, LongPixel, FloatPixel, or DoublePixel.
pixels
This array of values contain the pixel components as defined by map and type. You must preallocate this array where the expected length varies depending on the values of width, height, map, and type.

MagickInterpolativeResizeImage

MagickInterpolativeResizeImage() resize image using a interpolative method.

MagickBooleanType MagickInterpolativeResizeImage(MagickWand *wand, const size_t columns,const size_t rows, const PixelInterpolateMethod method)

A description of each parameter follows:

wand
the magick wand.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.
interpolate
the pixel interpolation method.

MagickInverseFourierTransformImage

MagickInverseFourierTransformImage() implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

The format of the MagickInverseFourierTransformImage method is:

MagickBooleanType MagickInverseFourierTransformImage(
  MagickWand *magnitude_wand,MagickWand *phase_wand,
  const MagickBooleanType magnitude)

A description of each parameter follows:

magnitude_wand
the magnitude or real wand.
phase_wand
the phase or imaginary wand.
magnitude
if true, return as magnitude / phase pair otherwise a real / imaginary image pair.

MagickLabelImage

MagickLabelImage() adds a label to your image.

The format of the MagickLabelImage method is:

MagickBooleanType MagickLabelImage(MagickWand *wand,const char *label)

A description of each parameter follows:

wand
the magick wand.
label
the image label.

MagickLevelImage

MagickLevelImage() adjusts the levels of an image by scaling the colors falling between specified white and black points to the full available quantum range. The parameters provided represent the black, mid, and white points. The black point specifies the darkest color in the image. Colors darker than the black point are set to zero. Mid point specifies a gamma correction to apply to the image. White point specifies the lightest color in the image. Colors brighter than the white point are set to the maximum quantum value.

The format of the MagickLevelImage method is:

MagickBooleanType MagickLevelImage(MagickWand *wand,
  const double black_point,const double gamma,const double white_point)
MagickBooleanType MagickLevelImage(MagickWand *wand,
  const ChannelType channel,const double black_point,const double gamma,
  const double white_point)

A description of each parameter follows:

wand
the magick wand.
channel
Identify which channel to level: RedPixelChannel, GreenPixelChannel, etc.
black_point
the black point.
gamma
the gamma.
white_point
the white point.

MagickLinearStretchImage

MagickLinearStretchImage() stretches with saturation the image intensity.

You can also reduce the influence of a particular channel with a gamma value of 0.

The format of the MagickLinearStretchImage method is:

MagickBooleanType MagickLinearStretchImage(MagickWand *wand,
  const double black_point,const double white_point)

A description of each parameter follows:

wand
the magick wand.
black_point
the black point.
white_point
the white point.

MagickLiquidRescaleImage

MagickLiquidRescaleImage() rescales image with seam carving.

MagickBooleanType MagickLiquidRescaleImage(MagickWand *wand, const size_t columns,const size_t rows, const double delta_x,const double rigidity)

A description of each parameter follows:

wand
the magick wand.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.
delta_x
maximum seam transversal step (0 means straight seams).
rigidity
introduce a bias for non-straight seams (typically 0).

MagickMagnifyImage

MagickMagnifyImage() is a convenience method that scales an image proportionally to twice its original size.

The format of the MagickMagnifyImage method is:

MagickBooleanType MagickMagnifyImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickMergeImageLayers

MagickMergeImageLayers() composes all the image layers from the current given image onward to produce a single image of the merged layers.

The inital canvas's size depends on the given LayerMethod, and is initialized using the first images background color. The images are then compositied onto that image in sequence using the given composition that has been assigned to each individual image.

The format of the MagickMergeImageLayers method is:

MagickWand *MagickMergeImageLayers(MagickWand *wand,
  const LayerMethod method)

A description of each parameter follows:

wand
the magick wand.
method
the method of selecting the size of the initial canvas.
MergeLayer: Merge all layers onto a canvas just large enough to hold all the actual images. The virtual canvas of the first image is preserved but otherwise ignored.
FlattenLayer: Use the virtual canvas size of first image. Images which fall outside this canvas is clipped. This can be used to 'fill out' a given virtual canvas.
MosaicLayer: Start with the virtual canvas of the first image, enlarging left and right edges to contain all images. Images with negative offsets will be clipped.

MagickMinifyImage

MagickMinifyImage() is a convenience method that scales an image proportionally to one-half its original size

The format of the MagickMinifyImage method is:

MagickBooleanType MagickMinifyImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickModulateImage

MagickModulateImage() lets you control the brightness, saturation, and hue of an image. Hue is the percentage of absolute rotation from the current position. For example 50 results in a counter-clockwise rotation of 90 degrees, 150 results in a clockwise rotation of 90 degrees, with 0 and 200 both resulting in a rotation of 180 degrees.

To increase the color brightness by 20 and decrease the color saturation by 10 and leave the hue unchanged, use: 120,90,100.

The format of the MagickModulateImage method is:

MagickBooleanType MagickModulateImage(MagickWand *wand,
  const double brightness,const double saturation,const double hue)

A description of each parameter follows:

wand
the magick wand.
brightness
the percent change in brighness.
saturation
the percent change in saturation.
hue
the percent change in hue.

MagickMontageImage

MagickMontageImage() creates a composite image by combining several separate images. The images are tiled on the composite image with the name of the image optionally appearing just below the individual tile.

The format of the MagickMontageImage method is:

MagickWand *MagickMontageImage(MagickWand *wand,
  const DrawingWand drawing_wand,const char *tile_geometry,
  const char *thumbnail_geometry,const MontageMode mode,
  const char *frame)

A description of each parameter follows:

wand
the magick wand.
drawing_wand
the drawing wand. The font name, size, and color are obtained from this wand.
tile_geometry
the number of tiles per row and page (e.g. 6x4+0+0).
thumbnail_geometry
Preferred image size and border size of each thumbnail (e.g. 120x120+4+3>).
mode
Thumbnail framing mode: Frame, Unframe, or Concatenate.
frame
Surround the image with an ornamental border (e.g. 15x15+3+3). The frame color is that of the thumbnail's matte color.

MagickMorphImages

MagickMorphImages() method morphs a set of images. Both the image pixels and size are linearly interpolated to give the appearance of a meta-morphosis from one image to the next.

The format of the MagickMorphImages method is:

MagickWand *MagickMorphImages(MagickWand *wand,
  const size_t number_frames)

A description of each parameter follows:

wand
the magick wand.
number_frames
the number of in-between images to generate.

MagickMorphologyImage

MagickMorphologyImage() applies a user supplied kernel to the image according to the given mophology method.

The format of the MagickMorphologyImage method is:

MagickBooleanType MagickMorphologyImage(MagickWand *wand,
  MorphologyMethod method,const ssize_t iterations,KernelInfo *kernel)

A description of each parameter follows:

wand
the magick wand.
method
the morphology method to be applied.
iterations
apply the operation this many times (or no change). A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1.
kernel
An array of doubles representing the morphology kernel.

MagickMotionBlurImage

MagickMotionBlurImage() simulates motion blur. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and MotionBlurImage() selects a suitable radius for you. Angle gives the angle of the blurring motion.

The format of the MagickMotionBlurImage method is:

MagickBooleanType MagickMotionBlurImage(MagickWand *wand,
  const double radius,const double sigma,const double angle)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.
angle
Apply the effect along this angle.

MagickNegateImage

MagickNegateImage() negates the colors in the reference image. The Grayscale option means that only grayscale values within the image are negated.

You can also reduce the influence of a particular channel with a gamma value of 0.

The format of the MagickNegateImage method is:

MagickBooleanType MagickNegateImage(MagickWand *wand,
  const MagickBooleanType gray)

A description of each parameter follows:

wand
the magick wand.
gray
If MagickTrue, only negate grayscale pixels within the image.

MagickNewImage

MagickNewImage() adds a blank image canvas of the specified size and background color to the wand.

The format of the MagickNewImage method is:

MagickBooleanType MagickNewImage(MagickWand *wand,
  const size_t columns,const size_t rows,
  const PixelWand *background)

A description of each parameter follows:

wand
the magick wand.
width
the image width.
height
the image height.
background
the image color.

MagickNextImage

MagickNextImage() sets the next image in the wand as the current image.

It is typically used after MagickResetIterator(), after which its first use will set the first image as the current image (unless the wand is empty).

It will return MagickFalse when no more images are left to be returned which happens when the wand is empty, or the current image is the last image.

When the above condition (end of image list) is reached, the iterator is automaticall set so that you can start using MagickPreviousImage() to again iterate over the images in the reverse direction, starting with the last image (again). You can jump to this condition immeditally using MagickSetLastIterator().

The format of the MagickNextImage method is:

MagickBooleanType MagickNextImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickNormalizeImage

MagickNormalizeImage() enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available

You can also reduce the influence of a particular channel with a gamma value of 0.

The format of the MagickNormalizeImage method is:

MagickBooleanType MagickNormalizeImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickOilPaintImage

MagickOilPaintImage() applies a special effect filter that simulates an oil painting. Each pixel is replaced by the most frequent color occurring in a circular region defined by radius.

The format of the MagickOilPaintImage method is:

MagickBooleanType MagickOilPaintImage(MagickWand *wand,
  const double radius,const double sigma)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the circular neighborhood.
sigma
the standard deviation of the Gaussian, in pixels.

MagickOpaquePaintImage

MagickOpaquePaintImage() changes any pixel that matches color with the color defined by fill.

The format of the MagickOpaquePaintImage method is:

MagickBooleanType MagickOpaquePaintImage(MagickWand *wand,
  const PixelWand *target,const PixelWand *fill,const double fuzz,
  const MagickBooleanType invert)

A description of each parameter follows:

wand
the magick wand.
target
Change this target color to the fill color within the image.
fill
the fill pixel wand.
fuzz
By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.
invert
paint any pixel that does not match the target color.

MagickOptimizeImageLayers

MagickOptimizeImageLayers() compares each image the GIF disposed forms of the previous image in the sequence. From this it attempts to select the smallest cropped image to replace each frame, while preserving the results of the animation.

The format of the MagickOptimizeImageLayers method is:

MagickWand *MagickOptimizeImageLayers(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickOptimizeImageTransparency

MagickOptimizeImageTransparency() takes a frame optimized GIF animation, and compares the overlayed pixels against the disposal image resulting from all the previous frames in the animation. Any pixel that does not change the disposal image (and thus does not effect the outcome of an overlay) is made transparent.

WARNING: This modifies the current images directly, rather than generate a new image sequence. The format of the MagickOptimizeImageTransparency method is:

MagickBooleanType MagickOptimizeImageTransparency(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickOrderedPosterizeImage

MagickOrderedPosterizeImage() performs an ordered dither based on a number of pre-defined dithering threshold maps, but over multiple intensity levels, which can be different for different channels, according to the input arguments.

The format of the MagickOrderedPosterizeImage method is:

MagickBooleanType MagickOrderedPosterizeImage(MagickWand *wand,
  const char *threshold_map)

A description of each parameter follows:

image
the image.
threshold_map
A string containing the name of the threshold dither map to use, followed by zero or more numbers representing the number of color levels tho dither between.
Any level number less than 2 is equivalent to 2, and means only binary dithering will be applied to each color channel.
No numbers also means a 2 level (bitmap) dither will be applied to all channels, while a single number is the number of levels applied to each channel in sequence. More numbers will be applied in turn to each of the color channels.
For example: "o3x3,6" generates a 6 level posterization of the image with a ordered 3x3 diffused pixel dither being applied between each level. While checker,8,8,4 will produce a 332 colormaped image with only a single checkerboard hash pattern (50 grey) between each color level, to basically double the number of color levels with a bare minimim of dithering.

MagickPingImage

MagickPingImage() is the same as MagickReadImage() except the only valid information returned is the image width, height, size, and format. It is designed to efficiently obtain this information from a file without reading the entire image sequence into memory.

The format of the MagickPingImage method is:

MagickBooleanType MagickPingImage(MagickWand *wand,const char *filename)

A description of each parameter follows:

wand
the magick wand.
filename
the image filename.

MagickPingImageBlob

MagickPingImageBlob() pings an image or image sequence from a blob.

The format of the MagickPingImageBlob method is:

MagickBooleanType MagickPingImageBlob(MagickWand *wand,
  const void *blob,const size_t length)

A description of each parameter follows:

wand
the magick wand.
blob
the blob.
length
the blob length.

MagickPingImageFile

MagickPingImageFile() pings an image or image sequence from an open file descriptor.

The format of the MagickPingImageFile method is:

MagickBooleanType MagickPingImageFile(MagickWand *wand,FILE *file)

A description of each parameter follows:

wand
the magick wand.
file
the file descriptor.

MagickPolaroidImage

MagickPolaroidImage() simulates a Polaroid picture.

The format of the MagickPolaroidImage method is:

MagickBooleanType MagickPolaroidImage(MagickWand *wand,
  const DrawingWand *drawing_wand,const char *caption,const double angle,
  const PixelInterpolateMethod method)

A description of each parameter follows:

wand
the magick wand.
drawing_wand
the draw wand.
caption
the Polaroid caption.
angle
Apply the effect along this angle.
method
the pixel interpolation method.

MagickPosterizeImage

MagickPosterizeImage() reduces the image to a limited number of color level.

The format of the MagickPosterizeImage method is:

MagickBooleanType MagickPosterizeImage(MagickWand *wand,
  const size_t levels,const DitherMethod method)

A description of each parameter follows:

wand
the magick wand.
levels
Number of color levels allowed in each channel. Very low values (2, 3, or 4) have the most visible effect.
method
choose the dither method: UndefinedDitherMethod, NoDitherMethod, RiemersmaDitherMethod, or FloydSteinbergDitherMethod.

MagickPreviewImages

MagickPreviewImages() tiles 9 thumbnails of the specified image with an image processing operation applied at varying strengths. This helpful to quickly pin-point an appropriate parameter for an image processing operation.

The format of the MagickPreviewImages method is:

MagickWand *MagickPreviewImages(MagickWand *wand,
  const PreviewType preview)

A description of each parameter follows:

wand
the magick wand.
preview
the preview type.

MagickPreviousImage

MagickPreviousImage() sets the previous image in the wand as the current image.

It is typically used after MagickSetLastIterator(), after which its first use will set the last image as the current image (unless the wand is empty).

It will return MagickFalse when no more images are left to be returned which happens when the wand is empty, or the current image is the first image. At that point the iterator is than reset to again process images in the forward direction, again starting with the first image in list. Images added at this point are prepended.

Also at that point any images added to the wand using MagickAddImages() or MagickReadImages() will be prepended before the first image. In this sense the condition is not quite exactly the same as MagickResetIterator().

The format of the MagickPreviousImage method is:

MagickBooleanType MagickPreviousImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickQuantizeImage

MagickQuantizeImage() analyzes the colors within a reference image and chooses a fixed number of colors to represent the image. The goal of the algorithm is to minimize the color difference between the input and output image while minimizing the processing time.

The format of the MagickQuantizeImage method is:

MagickBooleanType MagickQuantizeImage(MagickWand *wand,
  const size_t number_colors,const ColorspaceType colorspace,
  const size_t treedepth,const DitherMethod dither_method,
  const MagickBooleanType measure_error)

A description of each parameter follows:

wand
the magick wand.
number_colors
the number of colors.
colorspace
Perform color reduction in this colorspace, typically RGBColorspace.
treedepth
Normally, this integer value is zero or one. A zero or one tells Quantize to choose a optimal tree depth of Log4(number_colors). A tree of this depth generally allows the best representation of the reference image with the least amount of memory and the fastest computational speed. In some cases, such as an image with low color dispersion (a few number of colors), a value other than Log4(number_colors) is required. To expand the color tree completely, use a value of 8.
dither_method
choose from UndefinedDitherMethod, NoDitherMethod, RiemersmaDitherMethod, FloydSteinbergDitherMethod.
measure_error
A value other than zero measures the difference between the original and quantized images. This difference is the total quantization error. The error is computed by summing over all pixels in an image the distance squared in RGB space between each reference pixel value and its quantized value.

MagickQuantizeImages

MagickQuantizeImages() analyzes the colors within a sequence of images and chooses a fixed number of colors to represent the image. The goal of the algorithm is to minimize the color difference between the input and output image while minimizing the processing time.

The format of the MagickQuantizeImages method is:

MagickBooleanType MagickQuantizeImages(MagickWand *wand,
  const size_t number_colors,const ColorspaceType colorspace,
  const size_t treedepth,const DitherMethod dither_method,
  const MagickBooleanType measure_error)

A description of each parameter follows:

wand
the magick wand.
number_colors
the number of colors.
colorspace
Perform color reduction in this colorspace, typically RGBColorspace.
treedepth
Normally, this integer value is zero or one. A zero or one tells Quantize to choose a optimal tree depth of Log4(number_colors). A tree of this depth generally allows the best representation of the reference image with the least amount of memory and the fastest computational speed. In some cases, such as an image with low color dispersion (a few number of colors), a value other than Log4(number_colors) is required. To expand the color tree completely, use a value of 8.
dither_method
choose from these dither methods: NoDitherMethod, RiemersmaDitherMethod, or FloydSteinbergDitherMethod.
measure_error
A value other than zero measures the difference between the original and quantized images. This difference is the total quantization error. The error is computed by summing over all pixels in an image the distance squared in RGB space between each reference pixel value and its quantized value.

MagickRotationalBlurImage

MagickRotationalBlurImage() rotational blurs an image.

The format of the MagickRotationalBlurImage method is:

MagickBooleanType MagickRotationalBlurImage(MagickWand *wand,
  const double angle)

A description of each parameter follows:

wand
the magick wand.
angle
the angle of the blur in degrees.

MagickRaiseImage

MagickRaiseImage() creates a simulated three-dimensional button-like effect by lightening and darkening the edges of the image. Members width and height of raise_info define the width of the vertical and horizontal edge of the effect.

The format of the MagickRaiseImage method is:

MagickBooleanType MagickRaiseImage(MagickWand *wand,
  const size_t width,const size_t height,const ssize_t x,
  const ssize_t y,const MagickBooleanType raise)

A description of each parameter follows:

wand
the magick wand.
width,height,x,y
Define the dimensions of the area to raise.
raise
A value other than zero creates a 3-D raise effect, otherwise it has a lowered effect.

MagickRandomThresholdImage

MagickRandomThresholdImage() changes the value of individual pixels based on the intensity of each pixel compared to threshold. The result is a high-contrast, two color image.

The format of the MagickRandomThresholdImage method is:

MagickBooleanType MagickRandomThresholdImage(MagickWand *wand,
  const double low,const double high)

A description of each parameter follows:

wand
the magick wand.
low,high
Specify the high and low thresholds. These values range from 0 to QuantumRange.

MagickReadImage

MagickReadImage() reads an image or image sequence. The images are inserted jjust before the current image pointer position.

Use MagickSetFirstIterator(), to insert new images before all the current images in the wand, MagickSetLastIterator() to append add to the end, MagickSetIteratorIndex() to place images just after the given index.

The format of the MagickReadImage method is:

MagickBooleanType MagickReadImage(MagickWand *wand,const char *filename)

A description of each parameter follows:

wand
the magick wand.
filename
the image filename.

MagickReadImageBlob

MagickReadImageBlob() reads an image or image sequence from a blob. In all other respects it is like MagickReadImage().

The format of the MagickReadImageBlob method is:

MagickBooleanType MagickReadImageBlob(MagickWand *wand,
  const void *blob,const size_t length)

A description of each parameter follows:

wand
the magick wand.
blob
the blob.
length
the blob length.

MagickReadImageFile

MagickReadImageFile() reads an image or image sequence from an already opened file descriptor. Otherwise it is like MagickReadImage().

The format of the MagickReadImageFile method is:

MagickBooleanType MagickReadImageFile(MagickWand *wand,FILE *file)

A description of each parameter follows:

wand
the magick wand.
file
the file descriptor.

MagickRemapImage

MagickRemapImage() replaces the colors of an image with the closest color from a reference image.

The format of the MagickRemapImage method is:

MagickBooleanType MagickRemapImage(MagickWand *wand,
  const MagickWand *remap_wand,const DitherMethod method)

A description of each parameter follows:

wand
the magick wand.
affinity
the affinity wand.
method
choose from these dither methods: NoDitherMethod, RiemersmaDitherMethod, or FloydSteinbergDitherMethod.

MagickRemoveImage

MagickRemoveImage() removes an image from the image list.

The format of the MagickRemoveImage method is:

MagickBooleanType MagickRemoveImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.
insert
the splice wand.

MagickResampleImage

MagickResampleImage() resample image to desired resolution.

Bessel Blackman Box Catrom Cubic Gaussian Hanning Hermite Lanczos Mitchell Point Quandratic Sinc Triangle

Most of the filters are FIR (finite impulse response), however, Bessel, Gaussian, and Sinc are IIR (infinite impulse response). Bessel and Sinc are windowed (brought down to zero) with the Blackman filter.

The format of the MagickResampleImage method is:

MagickBooleanType MagickResampleImage(MagickWand *wand,
  const double x_resolution,const double y_resolution,
  const FilterTypes filter)

A description of each parameter follows:

wand
the magick wand.
x_resolution
the new image x resolution.
y_resolution
the new image y resolution.
filter
Image filter to use.

MagickResetImagePage

MagickResetImagePage() resets the Wand page canvas and position.

The format of the MagickResetImagePage method is:

MagickBooleanType MagickResetImagePage(MagickWand *wand,
  const char *page)

A description of each parameter follows:

wand
the magick wand.
page
the relative page specification.

MagickResizeImage

MagickResizeImage() scales an image to the desired dimensions with one of these filters:

    Bessel   Blackman   Box
    Catrom   CubicGaussian
    Hanning  Hermite    Lanczos
    Mitchell PointQuandratic
    Sinc     Triangle

Most of the filters are FIR (finite impulse response), however, Bessel, Gaussian, and Sinc are IIR (infinite impulse response). Bessel and Sinc are windowed (brought down to zero) with the Blackman filter.

The format of the MagickResizeImage method is:

MagickBooleanType MagickResizeImage(MagickWand *wand,
  const size_t columns,const size_t rows,const FilterTypes filter)

A description of each parameter follows:

wand
the magick wand.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.
filter
Image filter to use.

MagickRollImage

MagickRollImage() offsets an image as defined by x and y.

The format of the MagickRollImage method is:

MagickBooleanType MagickRollImage(MagickWand *wand,const ssize_t x,
  const size_t y)

A description of each parameter follows:

wand
the magick wand.
x
the x offset.
y
the y offset.

MagickRotateImage

MagickRotateImage() rotates an image the specified number of degrees. Empty triangles left over from rotating the image are filled with the background color.

The format of the MagickRotateImage method is:

MagickBooleanType MagickRotateImage(MagickWand *wand,
  const PixelWand *background,const double degrees)

A description of each parameter follows:

wand
the magick wand.
background
the background pixel wand.
degrees
the number of degrees to rotate the image.

MagickSampleImage

MagickSampleImage() scales an image to the desired dimensions with pixel sampling. Unlike other scaling methods, this method does not introduce any additional color into the scaled image.

The format of the MagickSampleImage method is:

MagickBooleanType MagickSampleImage(MagickWand *wand,
  const size_t columns,const size_t rows)

A description of each parameter follows:

wand
the magick wand.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.

MagickScaleImage

MagickScaleImage() scales the size of an image to the given dimensions.

The format of the MagickScaleImage method is:

MagickBooleanType MagickScaleImage(MagickWand *wand,
  const size_t columns,const size_t rows)

A description of each parameter follows:

wand
the magick wand.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.

MagickSegmentImage

MagickSegmentImage() segments an image by analyzing the histograms of the color components and identifying units that are homogeneous with the fuzzy C-means technique.

The format of the SegmentImage method is:

MagickBooleanType MagickSegmentImage(MagickWand *wand,
  const ColorspaceType colorspace,const MagickBooleanType verbose,
  const double cluster_threshold,const double smooth_threshold)

A description of each parameter follows.

wand

the wand.

colorspace

the image colorspace.

verbose

Set to MagickTrue to print detailed information about the identified classes.

cluster_threshold

This represents the minimum number of pixels contained in a hexahedra before it can be considered valid (expressed as a percentage).

smooth_threshold

the smoothing threshold eliminates noise in the second derivative of the histogram. As the value is increased, you can expect a smoother second derivative.

MagickSelectiveBlurImage

MagickSelectiveBlurImage() selectively blur an image within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.

The format of the MagickSelectiveBlurImage method is:

MagickBooleanType MagickSelectiveBlurImage(MagickWand *wand,
  const double radius,const double sigma,const double threshold)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the gaussian, in pixels.
threshold
only pixels within this contrast threshold are included in the blur operation.

MagickSeparateImage

MagickSeparateImage() separates a channel from the image and returns a grayscale image. A channel is a particular color component of each pixel in the image.

The format of the MagickSeparateImage method is:

MagickBooleanType MagickSeparateImage(MagickWand *wand,
  const ChannelType channel)

A description of each parameter follows:

wand
the magick wand.
channel
the channel.

MagickSepiaToneImage

MagickSepiaToneImage() applies a special effect to the image, similar to the effect achieved in a photo darkroom by sepia toning. Threshold ranges from 0 to QuantumRange and is a measure of the extent of the sepia toning. A threshold of 80 is a good starting point for a reasonable tone.

The format of the MagickSepiaToneImage method is:

MagickBooleanType MagickSepiaToneImage(MagickWand *wand,
  const double threshold)

A description of each parameter follows:

wand
the magick wand.
threshold
Define the extent of the sepia toning.

MagickSetImage

MagickSetImage() replaces the last image returned by MagickSetIteratorIndex(), MagickNextImage(), MagickPreviousImage() with the images from the specified wand.

The format of the MagickSetImage method is:

MagickBooleanType MagickSetImage(MagickWand *wand,
  const MagickWand *set_wand)

A description of each parameter follows:

wand
the magick wand.
set_wand
the set_wand wand.

MagickSetImageAlphaChannel

MagickSetImageAlphaChannel() activates, deactivates, resets, or sets the alpha channel.

The format of the MagickSetImageAlphaChannel method is:

MagickBooleanType MagickSetImageAlphaChannel(MagickWand *wand,
  const AlphaChannelOption alpha_type)

A description of each parameter follows:

wand
the magick wand.
alpha_type
the alpha channel type: ActivateAlphaChannel, DeactivateAlphaChannel, OpaqueAlphaChannel, or SetAlphaChannel.

MagickSetImageBackgroundColor

MagickSetImageBackgroundColor() sets the image background color.

The format of the MagickSetImageBackgroundColor method is:

MagickBooleanType MagickSetImageBackgroundColor(MagickWand *wand,
  const PixelWand *background)

A description of each parameter follows:

wand
the magick wand.
background
the background pixel wand.

MagickSetImageBluePrimary

MagickSetImageBluePrimary() sets the image chromaticity blue primary point.

The format of the MagickSetImageBluePrimary method is:

MagickBooleanType MagickSetImageBluePrimary(MagickWand *wand,
  const double x,const double y)

A description of each parameter follows:

wand
the magick wand.
x
the blue primary x-point.
y
the blue primary y-point.

MagickSetImageBorderColor

MagickSetImageBorderColor() sets the image border color.

The format of the MagickSetImageBorderColor method is:

MagickBooleanType MagickSetImageBorderColor(MagickWand *wand,
  const PixelWand *border)

A description of each parameter follows:

wand
the magick wand.
border
the border pixel wand.

MagickSetImageChannelMask

MagickSetImageChannelMask() sets image channel mask.

The format of the MagickSetImageChannelMask method is:

ChannelType MagickSetImageChannelMask(MagickWand *wand,
  const ChannelType channel_mask)

A description of each parameter follows:

wand
the magick wand.
channel_mask
the channel_mask wand.

MagickSetImageMask

MagickSetImageMask() sets image clip mask.

The format of the MagickSetImageMask method is:

MagickBooleanType MagickSetImageMask(MagickWand *wand,
  const PixelMask type,const MagickWand *clip_mask)

A description of each parameter follows:

wand
the magick wand.
type
type of mask, ReadPixelMask or WritePixelMask.
clip_mask
the clip_mask wand.

MagickSetImageColor

MagickSetImageColor() set the entire wand canvas to the specified color.

The format of the MagickSetImageColor method is:

MagickBooleanType MagickSetImageColor(MagickWand *wand,
  const PixelWand *color)

A description of each parameter follows:

wand
the magick wand.
background
the image color.

MagickSetImageColormapColor

MagickSetImageColormapColor() sets the color of the specified colormap index.

The format of the MagickSetImageColormapColor method is:

MagickBooleanType MagickSetImageColormapColor(MagickWand *wand,
  const size_t index,const PixelWand *color)

A description of each parameter follows:

wand
the magick wand.
index
the offset into the image colormap.
color
Return the colormap color in this wand.

MagickSetImageColorspace

MagickSetImageColorspace() sets the image colorspace. But does not modify the image data.

The format of the MagickSetImageColorspace method is:

MagickBooleanType MagickSetImageColorspace(MagickWand *wand,
  const ColorspaceType colorspace)

A description of each parameter follows:

wand
the magick wand.
colorspace
the image colorspace: UndefinedColorspace, RGBColorspace, GRAYColorspace, TransparentColorspace, OHTAColorspace, XYZColorspace, YCbCrColorspace, YCCColorspace, YIQColorspace, YPbPrColorspace, YPbPrColorspace, YUVColorspace, CMYKColorspace, sRGBColorspace, HSLColorspace, or HWBColorspace.

MagickSetImageCompose

MagickSetImageCompose() sets the image composite operator, useful for specifying how to composite the image thumbnail when using the MagickMontageImage() method.

The format of the MagickSetImageCompose method is:

MagickBooleanType MagickSetImageCompose(MagickWand *wand,
  const CompositeOperator compose)

A description of each parameter follows:

wand
the magick wand.
compose
the image composite operator.

MagickSetImageCompression

MagickSetImageCompression() sets the image compression.

The format of the MagickSetImageCompression method is:

MagickBooleanType MagickSetImageCompression(MagickWand *wand,
  const CompressionType compression)

A description of each parameter follows:

wand
the magick wand.
compression
the image compression type.

MagickSetImageCompressionQuality

MagickSetImageCompressionQuality() sets the image compression quality.

The format of the MagickSetImageCompressionQuality method is:

MagickBooleanType MagickSetImageCompressionQuality(MagickWand *wand,
  const size_t quality)

A description of each parameter follows:

wand
the magick wand.
quality
the image compression tlityype.

MagickSetImageDelay

MagickSetImageDelay() sets the image delay.

The format of the MagickSetImageDelay method is:

MagickBooleanType MagickSetImageDelay(MagickWand *wand,
  const size_t delay)

A description of each parameter follows:

wand
the magick wand.
delay
the image delay in ticks-per-second units.

MagickSetImageDepth

MagickSetImageDepth() sets the image depth.

The format of the MagickSetImageDepth method is:

MagickBooleanType MagickSetImageDepth(MagickWand *wand,
  const size_t depth)

A description of each parameter follows:

wand
the magick wand.
depth
the image depth in bits: 8, 16, or 32.

MagickSetImageDispose

MagickSetImageDispose() sets the image disposal method.

The format of the MagickSetImageDispose method is:

MagickBooleanType MagickSetImageDispose(MagickWand *wand,
  const DisposeType dispose)

A description of each parameter follows:

wand
the magick wand.
dispose
the image disposeal type.

MagickSetImageEndian

MagickSetImageEndian() sets the image endian method.

The format of the MagickSetImageEndian method is:

MagickBooleanType MagickSetImageEndian(MagickWand *wand,
  const EndianType endian)

A description of each parameter follows:

wand
the magick wand.
endian
the image endian type.

MagickSetImageExtent

MagickSetImageExtent() sets the image size (i.e. columns & rows).

The format of the MagickSetImageExtent method is:

MagickBooleanType MagickSetImageExtent(MagickWand *wand,
  const size_t columns,const unsigned rows)

A description of each parameter follows:

wand
the magick wand.
columns
The image width in pixels.
rows
The image height in pixels.

MagickSetImageFilename

MagickSetImageFilename() sets the filename of a particular image in a sequence.

The format of the MagickSetImageFilename method is:

MagickBooleanType MagickSetImageFilename(MagickWand *wand,
  const char *filename)

A description of each parameter follows:

wand
the magick wand.
filename
the image filename.

MagickSetImageFormat

MagickSetImageFormat() sets the format of a particular image in a sequence.

The format of the MagickSetImageFormat method is:

MagickBooleanType MagickSetImageFormat(MagickWand *wand,
  const char *format)

A description of each parameter follows:

wand
the magick wand.
format
the image format.

MagickSetImageFuzz

MagickSetImageFuzz() sets the image fuzz.

The format of the MagickSetImageFuzz method is:

MagickBooleanType MagickSetImageFuzz(MagickWand *wand,
  const double fuzz)

A description of each parameter follows:

wand
the magick wand.
fuzz
the image fuzz.

MagickSetImageGamma

MagickSetImageGamma() sets the image gamma.

The format of the MagickSetImageGamma method is:

MagickBooleanType MagickSetImageGamma(MagickWand *wand,
  const double gamma)

A description of each parameter follows:

wand
the magick wand.
gamma
the image gamma.

MagickSetImageGravity

MagickSetImageGravity() sets the image gravity type.

The format of the MagickSetImageGravity method is:

MagickBooleanType MagickSetImageGravity(MagickWand *wand,
  const GravityType gravity)

A description of each parameter follows:

wand
the magick wand.
gravity
positioning gravity (NorthWestGravity, NorthGravity, NorthEastGravity, WestGravity, CenterGravity, EastGravity, SouthWestGravity, SouthGravity, SouthEastGravity)

MagickSetImageGreenPrimary

MagickSetImageGreenPrimary() sets the image chromaticity green primary point.

The format of the MagickSetImageGreenPrimary method is:

MagickBooleanType MagickSetImageGreenPrimary(MagickWand *wand,
  const double x,const double y)

A description of each parameter follows:

wand
the magick wand.
x
the green primary x-point.
y
the green primary y-point.

MagickSetImageInterlaceScheme

MagickSetImageInterlaceScheme() sets the image interlace scheme.

The format of the MagickSetImageInterlaceScheme method is:

MagickBooleanType MagickSetImageInterlaceScheme(MagickWand *wand,
  const InterlaceType interlace)

A description of each parameter follows:

wand
the magick wand.
interlace
the image interlace scheme: NoInterlace, LineInterlace, PlaneInterlace, PartitionInterlace.

MagickSetImagePixelInterpolateMethod

MagickSetImagePixelInterpolateMethod() sets the image interpolate pixel method.

The format of the MagickSetImagePixelInterpolateMethod method is:

MagickBooleanType MagickSetImagePixelInterpolateMethod(MagickWand *wand,
  const PixelInterpolateMethod method)

A description of each parameter follows:

wand
the magick wand.
method
the image interpole pixel methods: choose from Undefined, Average, Bicubic, Bilinear, Filter, Integer, Mesh, NearestNeighbor.

MagickSetImageIterations

MagickSetImageIterations() sets the image iterations.

The format of the MagickSetImageIterations method is:

MagickBooleanType MagickSetImageIterations(MagickWand *wand,
  const size_t iterations)

A description of each parameter follows:

wand
the magick wand.
delay
the image delay in 1/100th of a second.

MagickSetImageMatte

MagickSetImageMatte() sets the image matte channel.

The format of the MagickSetImageMatteColor method is:

MagickBooleanType MagickSetImageMatteColor(MagickWand *wand,
  const MagickBooleanType *matte)

A description of each parameter follows:

wand
the magick wand.
matte
Set to MagickTrue to enable the image matte channel otherwise MagickFalse.

MagickSetImageMatteColor

MagickSetImageMatteColor() sets the image matte color.

The format of the MagickSetImageMatteColor method is:

MagickBooleanType MagickSetImageMatteColor(MagickWand *wand,
  const PixelWand *matte)

A description of each parameter follows:

wand
the magick wand.
matte
the matte pixel wand.

MagickSetImageAlpha

MagickSetImageAlpha() sets the image to the specified alpha level.

The format of the MagickSetImageAlpha method is:

MagickBooleanType MagickSetImageAlpha(MagickWand *wand,
  const double alpha)

A description of each parameter follows:

wand
the magick wand.
alpha
the level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.

MagickSetImageOrientation

MagickSetImageOrientation() sets the image orientation.

The format of the MagickSetImageOrientation method is:

MagickBooleanType MagickSetImageOrientation(MagickWand *wand,
  const OrientationType orientation)

A description of each parameter follows:

wand
the magick wand.
orientation
the image orientation type.

MagickSetImagePage

MagickSetImagePage() sets the page geometry of the image.

The format of the MagickSetImagePage method is:

MagickBooleanType MagickSetImagePage(MagickWand *wand,const size_t width,        const size_t height,const ssize_t x,const ssize_t y)

A description of each parameter follows:

wand
the magick wand.
width
the page width.
height
the page height.
x
the page x-offset.
y
the page y-offset.

MagickSetImageProgressMonitor

MagickSetImageProgressMonitor() sets the wand image progress monitor to the specified method and returns the previous progress monitor if any. The progress monitor method looks like this:

    MagickBooleanType MagickProgressMonitor(const char *text,
const MagickOffsetType offset,const MagickSizeType span,
void *client_data)

If the progress monitor returns MagickFalse, the current operation is interrupted.

The format of the MagickSetImageProgressMonitor method is:

MagickProgressMonitor MagickSetImageProgressMonitor(MagickWand *wand
  const MagickProgressMonitor progress_monitor,void *client_data)

A description of each parameter follows:

wand
the magick wand.
progress_monitor
Specifies a pointer to a method to monitor progress of an image operation.
client_data
Specifies a pointer to any client data.

MagickSetImageRedPrimary

MagickSetImageRedPrimary() sets the image chromaticity red primary point.

The format of the MagickSetImageRedPrimary method is:

MagickBooleanType MagickSetImageRedPrimary(MagickWand *wand,
  const double x,const double y)

A description of each parameter follows:

wand
the magick wand.
x
the red primary x-point.
y
the red primary y-point.

MagickSetImageRenderingIntent

MagickSetImageRenderingIntent() sets the image rendering intent.

The format of the MagickSetImageRenderingIntent method is:

MagickBooleanType MagickSetImageRenderingIntent(MagickWand *wand,
  const RenderingIntent rendering_intent)

A description of each parameter follows:

wand
the magick wand.
rendering_intent
the image rendering intent: UndefinedIntent, SaturationIntent, PerceptualIntent, AbsoluteIntent, or RelativeIntent.

MagickSetImageResolution

MagickSetImageResolution() sets the image resolution.

The format of the MagickSetImageResolution method is:

MagickBooleanType MagickSetImageResolution(MagickWand *wand,
  const double x_resolution,const double y_resolution)

A description of each parameter follows:

wand
the magick wand.
x_resolution
the image x resolution.
y_resolution
the image y resolution.

MagickSetImageScene

MagickSetImageScene() sets the image scene.

The format of the MagickSetImageScene method is:

MagickBooleanType MagickSetImageScene(MagickWand *wand,
  const size_t scene)

A description of each parameter follows:

wand
the magick wand.
delay
the image scene number.

MagickSetImageTicksPerSecond

MagickSetImageTicksPerSecond() sets the image ticks-per-second.

The format of the MagickSetImageTicksPerSecond method is:

MagickBooleanType MagickSetImageTicksPerSecond(MagickWand *wand,
  const ssize_t ticks_per-second)

A description of each parameter follows:

wand
the magick wand.
ticks_per_second
the units to use for the image delay.

MagickSetImageType

MagickSetImageType() sets the image type.

The format of the MagickSetImageType method is:

MagickBooleanType MagickSetImageType(MagickWand *wand,
  const ImageType image_type)

A description of each parameter follows:

wand
the magick wand.
image_type
the image type: UndefinedType, BilevelType, GrayscaleType, GrayscaleAlphaType, PaletteType, PaletteAlphaType, TrueColorType, TrueColorAlphaType, ColorSeparationType, ColorSeparationAlphaType, or OptimizeType.

MagickSetImageUnits

MagickSetImageUnits() sets the image units of resolution.

The format of the MagickSetImageUnits method is:

MagickBooleanType MagickSetImageUnits(MagickWand *wand,
  const ResolutionType units)

A description of each parameter follows:

wand
the magick wand.
units
the image units of resolution : UndefinedResolution, PixelsPerInchResolution, or PixelsPerCentimeterResolution.

MagickSetImageVirtualPixelMethod

MagickSetImageVirtualPixelMethod() sets the image virtual pixel method.

The format of the MagickSetImageVirtualPixelMethod method is:

VirtualPixelMethod MagickSetImageVirtualPixelMethod(MagickWand *wand,
  const VirtualPixelMethod method)

A description of each parameter follows:

wand
the magick wand.
method
the image virtual pixel method : UndefinedVirtualPixelMethod, ConstantVirtualPixelMethod, EdgeVirtualPixelMethod, MirrorVirtualPixelMethod, or TileVirtualPixelMethod.

MagickSetImageWhitePoint

MagickSetImageWhitePoint() sets the image chromaticity white point.

The format of the MagickSetImageWhitePoint method is:

MagickBooleanType MagickSetImageWhitePoint(MagickWand *wand,
  const double x,const double y)

A description of each parameter follows:

wand
the magick wand.
x
the white x-point.
y
the white y-point.

MagickShadeImage

MagickShadeImage() shines a distant light on an image to create a three-dimensional effect. You control the positioning of the light with azimuth and elevation; azimuth is measured in degrees off the x axis and elevation is measured in pixels above the Z axis.

The format of the MagickShadeImage method is:

MagickBooleanType MagickShadeImage(MagickWand *wand,
  const MagickBooleanType gray,const double azimuth,
  const double elevation)

A description of each parameter follows:

wand
the magick wand.
gray
A value other than zero shades the intensity of each pixel.
azimuth, elevation
Define the light source direction.

MagickShadowImage

MagickShadowImage() simulates an image shadow.

The format of the MagickShadowImage method is:

MagickBooleanType MagickShadowImage(MagickWand *wand,const double alpha,
  const double sigma,const ssize_t x,const ssize_t y)

A description of each parameter follows:

wand
the magick wand.
alpha
percentage transparency.
sigma
the standard deviation of the Gaussian, in pixels.
x
the shadow x-offset.
y
the shadow y-offset.

MagickSharpenImage

MagickSharpenImage() sharpens an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and MagickSharpenImage() selects a suitable radius for you.

The format of the MagickSharpenImage method is:

MagickBooleanType MagickSharpenImage(MagickWand *wand,
  const double radius,const double sigma)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.

MagickShaveImage

MagickShaveImage() shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

The format of the MagickShaveImage method is:

MagickBooleanType MagickShaveImage(MagickWand *wand,
  const size_t columns,const size_t rows)

A description of each parameter follows:

wand
the magick wand.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.

MagickShearImage

MagickShearImage() 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 amount of the shear is controlled by a shear angle. For X direction shears, x_shear is measured relative to the Y axis, and similarly, for Y direction shears y_shear is measured relative to the X axis. Empty triangles left over from shearing the image are filled with the background color.

The format of the MagickShearImage method is:

MagickBooleanType MagickShearImage(MagickWand *wand,
  const PixelWand *background,const double x_shear,const double y_shear)

A description of each parameter follows:

wand
the magick wand.
background
the background pixel wand.
x_shear
the number of degrees to shear the image.
y_shear
the number of degrees to shear the image.

MagickSigmoidalContrastImage

MagickSigmoidalContrastImage() adjusts the contrast of an image with a non-linear sigmoidal contrast algorithm. Increase the contrast of the image using a sigmoidal transfer function without saturating highlights or shadows. Contrast indicates how much to increase the contrast (0 is none; 3 is typical; 20 is pushing it); mid-point indicates where midtones fall in the resultant image (0 is white; 50 is middle-gray; 100 is black). Set sharpen to MagickTrue to increase the image contrast otherwise the contrast is reduced.

The format of the MagickSigmoidalContrastImage method is:

MagickBooleanType MagickSigmoidalContrastImage(MagickWand *wand,
  const MagickBooleanType sharpen,const double alpha,const double beta)

A description of each parameter follows:

wand
the magick wand.
sharpen
Increase or decrease image contrast.
alpha
strength of the contrast, the larger the number the more 'threshold-like' it becomes.
beta
midpoint of the function as a color value 0 to QuantumRange.

MagickSimilarityImage

MagickSimilarityImage() compares the reference image of the image and returns the best match offset. In addition, it returns a similarity image such that an exact match location is completely white and if none of the pixels match, black, otherwise some gray level in-between.

The format of the MagickSimilarityImage method is:

MagickWand *MagickSimilarityImage(MagickWand *wand,
  const MagickWand *reference,const MetricType metric,
  const double similarity_threshold,RectangeInfo *offset,
  double *similarity)

A description of each parameter follows:

wand
the magick wand.
reference
the reference wand.
metric
the metric.
similarity_threshold
minimum distortion for (sub)image match.
offset
the best match offset of the reference image within the image.
similarity
the computed similarity between the images.

MagickSketchImage

MagickSketchImage() simulates a pencil sketch. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and SketchImage() selects a suitable radius for you. Angle gives the angle of the blurring motion.

The format of the MagickSketchImage method is:

MagickBooleanType MagickSketchImage(MagickWand *wand,
  const double radius,const double sigma,const double angle)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.
angle
apply the effect along this angle.

MagickSmushImages

MagickSmushImages() takes all images from the current image pointer to the end of the image list and smushs them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right.

The format of the MagickSmushImages method is:

MagickWand *MagickSmushImages(MagickWand *wand,
  const MagickBooleanType stack,const ssize_t offset)

A description of each parameter follows:

wand
the magick wand.
stack
By default, images are stacked left-to-right. Set stack to MagickTrue to stack them top-to-bottom.
offset
minimum distance in pixels between images.

MagickSolarizeImage

MagickSolarizeImage() applies a special effect to the image, similar to the effect achieved in a photo darkroom by selectively exposing areas of photo sensitive paper to light. Threshold ranges from 0 to QuantumRange and is a measure of the extent of the solarization.

The format of the MagickSolarizeImage method is:

MagickBooleanType MagickSolarizeImage(MagickWand *wand,
  const double threshold)

A description of each parameter follows:

wand
the magick wand.
threshold
Define the extent of the solarization.

MagickSparseColorImage

MagickSparseColorImage(), given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods.

The format of the MagickSparseColorImage method is:

MagickBooleanType MagickSparseColorImage(MagickWand *wand,
  const SparseColorMethod method,const size_t number_arguments,
  const double *arguments)

A description of each parameter follows:

image
the image to be sparseed.
method
the method of image sparseion.
ArcSparseColorion will always ignore source image offset, and always 'bestfit' the destination image with the top left corner offset relative to the polar mapping center.
Bilinear has no simple inverse mapping so will not allow 'bestfit' style of image sparseion.
Affine, Perspective, and Bilinear, will do least squares fitting of the distrotion when more than the minimum number of control point pairs are provided.
Perspective, and Bilinear, will fall back to a Affine sparseion when less than 4 control point pairs are provided. While Affine sparseions will let you use any number of control point pairs, that is Zero pairs is a No-Op (viewport only) distrotion, one pair is a translation and two pairs of control points will do a scale-rotate-translate, without any shearing.
number_arguments
the number of arguments given for this sparseion method.
arguments
the arguments for this sparseion method.

MagickSpliceImage

MagickSpliceImage() splices a solid color into the image.

The format of the MagickSpliceImage method is:

MagickBooleanType MagickSpliceImage(MagickWand *wand,
  const size_t width,const size_t height,const ssize_t x,
  const ssize_t y)

A description of each parameter follows:

wand
the magick wand.
width
the region width.
height
the region height.
x
the region x offset.
y
the region y offset.

MagickSpreadImage

MagickSpreadImage() is a special effects method that randomly displaces each pixel in a block defined by the radius parameter.

The format of the MagickSpreadImage method is:

MagickBooleanType MagickSpreadImage(MagickWand *wand,
  const PixelInterpolateMethod method,const double radius)
  
  A description of each parameter follows:
wand

the magick wand.

method

intepolation method.

radius

Choose a random pixel in a neighborhood of this extent.

MagickStatisticImage

MagickStatisticImage() replace each pixel with corresponding statistic from the neighborhood of the specified width and height.

The format of the MagickStatisticImage method is:

MagickBooleanType MagickStatisticImage(MagickWand *wand,
  const StatisticType type,const double width,const size_t height)

A description of each parameter follows:

wand
the magick wand.
type
the statistic type (e.g. median, mode, etc.).
width
the width of the pixel neighborhood.
height
the height of the pixel neighborhood.

MagickSteganoImage

MagickSteganoImage() hides a digital watermark within the image. Recover the hidden watermark later to prove that the authenticity of an image. Offset defines the start position within the image to hide the watermark.

The format of the MagickSteganoImage method is:

MagickWand *MagickSteganoImage(MagickWand *wand,
  const MagickWand *watermark_wand,const ssize_t offset)

A description of each parameter follows:

wand
the magick wand.
watermark_wand
the watermark wand.
offset
Start hiding at this offset into the image.

MagickStereoImage

MagickStereoImage() composites two images and produces a single image that is the composite of a left and right image of a stereo pair

The format of the MagickStereoImage method is:

MagickWand *MagickStereoImage(MagickWand *wand,
  const MagickWand *offset_wand)

A description of each parameter follows:

wand
the magick wand.
offset_wand
Another image wand.

MagickStripImage

MagickStripImage() strips an image of all profiles and comments.

The format of the MagickStripImage method is:

MagickBooleanType MagickStripImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickSwirlImage

MagickSwirlImage() swirls the pixels about the center of the image, where degrees indicates the sweep of the arc through which each pixel is moved. You get a more dramatic effect as the degrees move from 1 to 360.

The format of the MagickSwirlImage method is:

MagickBooleanType MagickSwirlImage(MagickWand *wand,const double degrees,
  const PixelInterpolateMethod method)

A description of each parameter follows:

wand
the magick wand.
degrees
Define the tightness of the swirling effect.
method
the pixel interpolation method.

MagickTextureImage

MagickTextureImage() repeatedly tiles the texture image across and down the image canvas.

The format of the MagickTextureImage method is:

MagickWand *MagickTextureImage(MagickWand *wand,
  const MagickWand *texture_wand)

A description of each parameter follows:

wand
the magick wand.
texture_wand
the texture wand

MagickThresholdImage

MagickThresholdImage() changes the value of individual pixels based on the intensity of each pixel compared to threshold. The result is a high-contrast, two color image.

The format of the MagickThresholdImage method is:

MagickBooleanType MagickThresholdImage(MagickWand *wand,
  const double threshold)
MagickBooleanType MagickThresholdImageChannel(MagickWand *wand,
  const ChannelType channel,const double threshold)

A description of each parameter follows:

wand
the magick wand.
channel
the image channel(s).
threshold
Define the threshold value.

MagickThumbnailImage

MagickThumbnailImage() changes the size of an image to the given dimensions and removes any associated profiles. The goal is to produce small low cost thumbnail images suited for display on the Web.

The format of the MagickThumbnailImage method is:

MagickBooleanType MagickThumbnailImage(MagickWand *wand,
  const size_t columns,const size_t rows)

A description of each parameter follows:

wand
the magick wand.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.

MagickTintImage

MagickTintImage() applies a color vector to each pixel in the image. The length of the vector is 0 for black and white and at its maximum for the midtones. The vector weighting function is f(x)=(1-(4.0*((x-0.5)*(x-0.5)))).

The format of the MagickTintImage method is:

MagickBooleanType MagickTintImage(MagickWand *wand,
  const PixelWand *tint,const PixelWand *blend)

A description of each parameter follows:

wand
the magick wand.
tint
the tint pixel wand.
alpha
the alpha pixel wand.

MagickTransformImage

MagickTransformImage() is a convenience method that behaves like MagickResizeImage() or MagickCropImage() but accepts scaling and/or cropping information as a region geometry specification. If the operation fails, a NULL image handle is returned.

The format of the MagickTransformImage method is:

MagickWand *MagickTransformImage(MagickWand *wand,const char *crop,
  const char *geometry)

A description of each parameter follows:

wand
the magick wand.
crop
A crop geometry string. This geometry defines a subregion of the image to crop.
geometry
An image geometry string. This geometry defines the final size of the image.

MagickTransformImageColorspace

MagickTransformImageColorspace() transform the image colorspace, setting the images colorspace while transforming the images data to that colorspace.

The format of the MagickTransformImageColorspace method is:

MagickBooleanType MagickTransformImageColorspace(MagickWand *wand,
  const ColorspaceType colorspace)

A description of each parameter follows:

wand
the magick wand.
colorspace
the image colorspace: UndefinedColorspace, sRGBColorspace, RGBColorspace, GRAYColorspace, OHTAColorspace, XYZColorspace, YCbCrColorspace, YCCColorspace, YIQColorspace, YPbPrColorspace, YPbPrColorspace, YUVColorspace, CMYKColorspace, HSLColorspace, HWBColorspace.

MagickTransparentPaintImage

MagickTransparentPaintImage() changes any pixel that matches color with the color defined by fill.

The format of the MagickTransparentPaintImage method is:

MagickBooleanType MagickTransparentPaintImage(MagickWand *wand,
  const PixelWand *target,const double alpha,const double fuzz,
  const MagickBooleanType invert)

A description of each parameter follows:

wand
the magick wand.
target
Change this target color to specified alpha value within the image.
alpha
the level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.
fuzz
By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.
invert
paint any pixel that does not match the target color.

MagickTransposeImage

MagickTransposeImage() creates a vertical mirror image by reflecting the pixels around the central x-axis while rotating them 90-degrees.

The format of the MagickTransposeImage method is:

MagickBooleanType MagickTransposeImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickTransverseImage

MagickTransverseImage() creates a horizontal mirror image by reflecting the pixels around the central y-axis while rotating them 270-degrees.

The format of the MagickTransverseImage method is:

MagickBooleanType MagickTransverseImage(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickTrimImage

MagickTrimImage() remove edges that are the background color from the image.

The format of the MagickTrimImage method is:

MagickBooleanType MagickTrimImage(MagickWand *wand,const double fuzz)

A description of each parameter follows:

wand
the magick wand.
fuzz
By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.

MagickUniqueImageColors

MagickUniqueImageColors() discards all but one of any pixel color.

The format of the MagickUniqueImageColors method is:

MagickBooleanType MagickUniqueImageColors(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickUnsharpMaskImage

MagickUnsharpMaskImage() sharpens an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and UnsharpMaskImage() selects a suitable radius for you.

The format of the MagickUnsharpMaskImage method is:

MagickBooleanType MagickUnsharpMaskImage(MagickWand *wand,
  const double radius,const double sigma,const double gain,
  const double threshold)

A description of each parameter follows:

wand
the magick wand.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.
gain
the percentage of the difference between the original and the blur image that is added back into the original.
threshold
the threshold in pixels needed to apply the diffence gain.

MagickVignetteImage

MagickVignetteImage() softens the edges of the image in vignette style.

The format of the MagickVignetteImage method is:

MagickBooleanType MagickVignetteImage(MagickWand *wand,
  const double radius,const double sigma,const ssize_t x,
  const ssize_t y)

A description of each parameter follows:

wand
the magick wand.
radius
the radius.
sigma
the sigma.
x, y
Define the x and y ellipse offset.

MagickWaveImage

MagickWaveImage() creates a "ripple" effect in the image by shifting the pixels vertically along a sine wave whose amplitude and wavelength is specified by the given parameters.

The format of the MagickWaveImage method is:

MagickBooleanType MagickWaveImage(MagickWand *wand,
  const double amplitude,const double wave_length,
  const PixelInterpolateMethod method)

A description of each parameter follows:

wand
the magick wand.
amplitude, wave_length
Define the amplitude and wave length of the sine wave.
method
the pixel interpolation method.

MagickWhiteThresholdImage

MagickWhiteThresholdImage() is like ThresholdImage() but force all pixels above the threshold into white while leaving all pixels below the threshold unchanged.

The format of the MagickWhiteThresholdImage method is:

MagickBooleanType MagickWhiteThresholdImage(MagickWand *wand,
  const PixelWand *threshold)

A description of each parameter follows:

wand
the magick wand.
threshold
the pixel wand.

MagickWriteImage

MagickWriteImage() writes an image to the specified filename. If the filename parameter is NULL, the image is written to the filename set by MagickReadImage() or MagickSetImageFilename().

The format of the MagickWriteImage method is:

MagickBooleanType MagickWriteImage(MagickWand *wand,
  const char *filename)

A description of each parameter follows:

wand
the magick wand.
filename
the image filename.

MagickWriteImageFile

MagickWriteImageFile() writes an image to an open file descriptor.

The format of the MagickWriteImageFile method is:

MagickBooleanType MagickWriteImageFile(MagickWand *wand,FILE *file)

A description of each parameter follows:

wand
the magick wand.
file
the file descriptor.

MagickWriteImages

MagickWriteImages() writes an image or image sequence.

The format of the MagickWriteImages method is:

MagickBooleanType MagickWriteImages(MagickWand *wand,
  const char *filename,const MagickBooleanType adjoin)

A description of each parameter follows:

wand
the magick wand.
filename
the image filename.
adjoin
join images into a single multi-image file.

MagickWriteImagesFile

MagickWriteImagesFile() writes an image sequence to an open file descriptor.

The format of the MagickWriteImagesFile method is:

MagickBooleanType MagickWriteImagesFile(MagickWand *wand,FILE *file)

A description of each parameter follows:

wand
the magick wand.
file
the file descriptor.
ImageMagick: MagickCore, C API for ImageMagick: Get the Version and Copyrights

GetMagickCopyrightGetMagickDelegatesGetMagickFeaturesGetMagickHomeURLGetMagickLicenseGetMagickPackageNameGetMagickQuantumDepthGetMagickQuantumRangeGetMagickReleaseDateGetMagickSignatureGetMagickVersionListMagickVersion

GetMagickCopyright

GetMagickCopyright() returns the ImageMagick API copyright as a string.

The format of the GetMagickCopyright method is:

const char *GetMagickCopyright(void)

GetMagickDelegates

GetMagickDelegates() returns the ImageMagick delegate libraries.

The format of the GetMagickDelegates method is:

const char *GetMagickDelegates(void)

No parameters are required.

GetMagickFeatures

GetMagickFeatures() returns the ImageMagick features.

The format of the GetMagickFeatures method is:

const char *GetMagickFeatures(void)

No parameters are required.

GetMagickHomeURL

GetMagickHomeURL() returns the ImageMagick home URL.

The format of the GetMagickHomeURL method is:

char *GetMagickHomeURL(void)

GetMagickLicense

GetMagickLicense() returns the ImageMagick API license as a string.

The format of the GetMagickLicense method is:

const char *GetMagickLicense(void)

GetMagickPackageName

GetMagickPackageName() returns the ImageMagick package name.

The format of the GetMagickName method is:

const char *GetMagickName(void)

No parameters are required.

GetMagickQuantumDepth

GetMagickQuantumDepth() returns the ImageMagick quantum depth.

The format of the GetMagickQuantumDepth method is:

const char *GetMagickQuantumDepth(size_t *depth)

A description of each parameter follows:

depth
the quantum depth is returned as a number.

GetMagickQuantumRange

GetMagickQuantumRange() returns the ImageMagick quantum range.

The format of the GetMagickQuantumRange method is:

const char *GetMagickQuantumRange(size_t *range)

A description of each parameter follows:

range
the quantum range is returned as a number.

GetMagickReleaseDate

GetMagickReleaseDate() returns the ImageMagick release date.

The format of the GetMagickReleaseDate method is:

const char *GetMagickReleaseDate(void)

No parameters are required.

GetMagickSignature

GetMagickSignature() returns a signature that uniquely encodes the MagickCore libary version, quantum depth, HDRI status, OS word size, and endianness.

The format of the GetMagickSignature method is:

unsigned int GetMagickSignature(const StringInfo *nonce)

A description of each parameter follows:

nonce
arbitrary data.

GetMagickVersion

GetMagickVersion() returns the ImageMagick API version as a string and as a number.

The format of the GetMagickVersion method is:

const char *GetMagickVersion(size_t *version)

A description of each parameter follows:

version
the ImageMagick version is returned as a number.

ListMagickVersion

ListMagickVersion() identifies the ImageMagick version by printing its attributes to the file. Attributes include the copyright, features, and delegates.

The format of the ListMagickVersion method is:

void ListMagickVersion(FILE *file)

A description of each parameter follows:

file
the file, typically stdout.
ImageMagick: MagickCore, C API for ImageMagick: Colormap Methods

AcquireImageColormapCycleColormap

AcquireImageColormap

AcquireImageColormap() allocates an image colormap and initializes it to a linear gray colorspace. If the image already has a colormap, it is replaced. AcquireImageColormap() returns MagickTrue if successful, otherwise MagickFalse if there is not enough memory.

The format of the AcquireImageColormap method is:

MagickBooleanType AcquireImageColormap(Image *image,const size_t colors,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
colors
the number of colors in the image colormap.
exception
return any errors or warnings in this structure.

CycleColormap

CycleColormap() displaces an image's colormap by a given number of positions. If you cycle the colormap a number of times you can produce a psychodelic effect.

WARNING: this assumes an images colormap is in a well know and defined order. Currently Imagemagick has no way of setting that order.

The format of the CycleColormapImage method is:

MagickBooleanType CycleColormapImage(Image *image,const ssize_t displace,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
displace
displace the colormap this amount.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Fourier Transform

ComplexImagesForwardFourierTransformImageInverseFourierTransformImage

ComplexImages

ComplexImages() performs complex mathematics on an image sequence.

The format of the ComplexImages method is:

MagickBooleanType ComplexImages(Image *images,const ComplexOperator op,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
op
A complex op.
exception
return any errors or warnings in this structure.

ForwardFourierTransformImage

ForwardFourierTransformImage() implements the discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

The format of the ForwadFourierTransformImage method is:

Image *ForwardFourierTransformImage(const Image *image,
  const MagickBooleanType modulus,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
modulus
if true, return as transform as a magnitude / phase pair otherwise a real / imaginary image pair.
exception
return any errors or warnings in this structure.

InverseFourierTransformImage

InverseFourierTransformImage() implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.

The format of the InverseFourierTransformImage method is:

Image *InverseFourierTransformImage(const Image *magnitude_image,
  const Image *phase_image,const MagickBooleanType modulus,
  ExceptionInfo *exception)

A description of each parameter follows:

magnitude_image
the magnitude or real image.
phase_image
the phase or imaginary image.
modulus
if true, return transform as a magnitude / phase pair otherwise a real / imaginary image pair.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Working with Image Lists

AppendImageToListCloneImageListCloneImagesDeleteImageFromListDeleteImagesDestroyImageListDuplicateImagesGetFirstImageInListGetImageFromListGetImageIndexInListGetImageListLengthGetLastImageInListGetNextImageInListGetPreviousImageInListImageListToArrayInsertImageInListNewImageListPrependImageToListRemoveImageFromListRemoveFirstImageFromListRemoveLastImageFromListReplaceImageInListReplaceImageInListReturnLastReverseImageListSpliceImageIntoListSplitImageList

AppendImageToList

AppendImageToList() appends the second image list to the end of the first list. The given image list pointer is left unchanged, unless it was empty.

The format of the AppendImageToList method is:

AppendImageToList(Image *images,const Image *image)

A description of each parameter follows:

images
the image list to be appended to.
image
the appended image or image list.

CloneImageList

CloneImageList() returns a duplicate of the image list.

The format of the CloneImageList method is:

Image *CloneImageList(const Image *images,ExceptionInfo *exception)

A description of each parameter follows:

images
the image list.
exception
return any errors or warnings in this structure.

CloneImages

CloneImages() clones one or more images from an image sequence, using a comma separated list of image numbers or ranges.

The numbers start at 0 for the first image in the list, while negative numbers refer to images starting counting from the end of the range. Images may be refered to multiple times to clone them multiple times. Images refered beyond the available number of images in list are ignored.

Images referenced may be reversed, and results in a clone of those images also being made with a reversed order.

The format of the CloneImages method is:

Image *CloneImages(const Image *images,const char *scenes,
  ExceptionInfo *exception)

A description of each parameter follows:

images
the image sequence.
scenes
This character string specifies which scenes to clone (e.g. 1,3-5,7-3,2).
exception
return any errors or warnings in this structure.

DeleteImageFromList

DeleteImageFromList() deletes an image from the list. List pointer is moved to the next image, if one is present. See RemoveImageFromList().

The format of the DeleteImageFromList method is:

DeleteImageFromList(Image **images)

A description of each parameter follows:

images
the image list.

DeleteImages

DeleteImages() deletes one or more images from an image sequence, using a comma separated list of image numbers or ranges.

The numbers start at 0 for the first image, while negative numbers refer to images starting counting from the end of the range. Images may be refered to multiple times without problems. Image refered beyond the available number of images in list are ignored.

If the referenced images are in the reverse order, that range will be completely ignored, unlike CloneImages().

The format of the DeleteImages method is:

DeleteImages(Image **images,const char *scenes,ExceptionInfo *exception)

A description of each parameter follows:

images
the image sequence.
scenes
This character string specifies which scenes to delete (e.g. 1,3-5,-2-6,2).
exception
return any errors or warnings in this structure.

DestroyImageList

DestroyImageList() destroys an image list.

The format of the DestroyImageList method is:

Image *DestroyImageList(Image *image)

A description of each parameter follows:

image
the image sequence.

DuplicateImages

DuplicateImages() duplicates one or more images from an image sequence, using a count and a comma separated list of image numbers or ranges.

The numbers start at 0 for the first image, while negative numbers refer to images starting counting from the end of the range. Images may be refered to multiple times without problems. Image refered beyond the available number of images in list are ignored.

The format of the DuplicateImages method is:

Image *DuplicateImages(Image *images,const size_t number_duplicates,
  const char *scenes,ExceptionInfo *exception)

A description of each parameter follows:

images
the image sequence.
number_duplicates
duplicate the image sequence this number of times.
scenes
This character string specifies which scenes to duplicate (e.g. 1,3-5,-2-6,2).
exception
return any errors or warnings in this structure.

GetFirstImageInList

GetFirstImageInList() returns a pointer to the first image in the list.

The format of the GetFirstImageInList method is:

Image *GetFirstImageInList(const Image *images)

A description of each parameter follows:

images
the image list.

GetImageFromList

GetImageFromList() returns an image at the specified index from the image list. Starting with 0 as the first image in the list.

A negative offset will return the image from the end of the list, such that an index of -1 is the last image.

If no such image exists at the specified offset a NULL image pointer is returned. This will only happen if index is less that the negative of the list length, or larger than list length -1. EG: ( -N to N-1 )

The format of the GetImageFromList method is:

Image *GetImageFromList(const Image *images,const ssize_t index)

A description of each parameter follows:

images
the image list.
index
the position within the list.

GetImageIndexInList

GetImageIndexInList() returns the offset in the list of the specified image.

The format of the GetImageIndexInList method is:

ssize_t GetImageIndexInList(const Image *images)

A description of each parameter follows:

images
the image list.

GetImageListLength

GetImageListLength() returns the length of the list (the number of images in the list).

The format of the GetImageListLength method is:

size_t GetImageListLength(const Image *images)

A description of each parameter follows:

images
the image list.

GetLastImageInList

GetLastImageInList() returns a pointer to the last image in the list.

The format of the GetLastImageInList method is:

Image *GetLastImageInList(const Image *images)

A description of each parameter follows:

images
the image list.

GetNextImageInList

GetNextImageInList() returns the next image in the list.

The format of the GetNextImageInList method is:

Image *GetNextImageInList(const Image *images)

A description of each parameter follows:

images
the image list.

GetPreviousImageInList

GetPreviousImageInList() returns the previous image in the list.

The format of the GetPreviousImageInList method is:

Image *GetPreviousImageInList(const Image *images)

A description of each parameter follows:

images
the image list.

ImageListToArray

ImageListToArray() is a convenience method that converts an image list to a sequential array, with a NULL image pointer at the end of the array.

The images remain part of the original image list, with the array providing an alternative means of indexing the image array.

group = ImageListToArray(images, exception); while (i = 0; group[i] != (Image *) NULL; i++) printf("s\n", group[i]->filename); printf("d images\n", i); group = RelinquishMagickMemory(group);

The format of the ImageListToArray method is:

Image **ImageListToArray(const Image *images,ExceptionInfo *exception)

A description of each parameter follows:

image
the image list.
exception
return any errors or warnings in this structure.

InsertImageInList

InsertImageInList() insert the given image or image list, into the first image list, immediately AFTER the image pointed to. The given image list pointer is left unchanged unless previously empty.

The format of the InsertImageInList method is:

InsertImageInList(Image **images,Image *insert)

A description of each parameter follows:

images
the image list to insert into.
insert
the image list to insert.

NewImageList

NewImageList() creates an empty image list.

The format of the NewImageList method is:

Image *NewImageList(void)

PrependImageToList

PrependImageToList() prepends the image to the beginning of the list.

The format of the PrependImageToList method is:

PrependImageToList(Image *images,Image *image)

A description of each parameter follows:

images
the image list.
image
the image.

RemoveImageFromList

RemoveImageFromList() removes and returns the image pointed to.

The given image list pointer is set to point to the next image in list if it exists, otherwise it is set to the previous image, or NULL if list was emptied.

The format of the RemoveImageFromList method is:

Image *RemoveImageFromList(Image **images)

A description of each parameter follows:

images
the image list.

RemoveFirstImageFromList

RemoveFirstImageFromList() removes and returns the first image in the list.

If the given image list pointer pointed to the removed first image, it is set to the new first image of list, or NULL if list was emptied, otherwise it is left as is.

The format of the RemoveFirstImageFromList method is:

Image *RemoveFirstImageFromList(Image **images)

A description of each parameter follows:

images
the image list.

RemoveLastImageFromList

RemoveLastImageFromList() removes and returns the last image from the list.

If the given image list pointer pointed to the removed last image, it is set to the new last image of list, or NULL if list was emptied, otherwise it is left as is.

The format of the RemoveLastImageFromList method is:

Image *RemoveLastImageFromList(Image **images)

A description of each parameter follows:

images
the image list.

ReplaceImageInList

ReplaceImageInList() replaces an image in the list with the given image, or list of images. Old image is destroyed.

The images list pointer is set to point to the first image of the inserted list of images.

The format of the ReplaceImageInList method is:

ReplaceImageInList(Image **images,Image *replace)

A description of each parameter follows:

images
the list and pointer to image to replace
replace
the image or image list replacing the original

ReplaceImageInListReturnLast

ReplaceImageInListReturnLast() is exactly as ReplaceImageInList() except the images pointer is set to the last image in the list of replacemen images.

This allows you to simply use GetNextImageInList() to go to the image that follows the just replaced image, even if a list of replacement images was inserted.

The format of the ReplaceImageInList method is:

ReplaceImageInListReturnLast(Image **images,Image *replace)

A description of each parameter follows:

images
the list and pointer to image to replace
replace
the image or image list replacing the original

ReverseImageList

ReverseImageList() reverses the order of an image list. The list pointer is reset to that start of the re-ordered list.

The format of the ReverseImageList method is:

void ReverseImageList(Image **images)

A description of each parameter follows:

images
the image list.

SpliceImageIntoList

SpliceImageIntoList() removes 'length' images from the list and replaces them with the specified splice. Removed images are returned.

The format of the SpliceImageIntoList method is:

SpliceImageIntoList(Image **images,const size_t,
  const Image *splice)

A description of each parameter follows:

images
the image list.
length
the length of the image list to remove.
splice
Replace the removed image list with this list.

SplitImageList

SplitImageList() splits an image into two lists, after given image The list that was split off is returned, which may be empty.

The format of the SplitImageList method is:

Image *SplitImageList(Image *images)

A description of each parameter follows:

images
the image list.
ImageMagick: MagickCore, C API for ImageMagick: Shear or Rotate an Image by an Arbitrary Angle

The XShearImageDeskewImageIntegralRotateImageShearImageShearRotateImage

The XShearImage

The XShearImage() and YShearImage() methods are based on the paper "A Fast Algorithm for General Raster Rotatation" by Alan W. Paeth, Graphics Interface '86 (Vancouver). ShearRotateImage() is adapted from a similar method based on the Paeth paper written by Michael Halle of the Spatial Imaging Group, MIT Media Lab.

DeskewImage

DeskewImage() removes skew from the image. Skew is an artifact that occurs in scanned images because of the camera being misaligned, imperfections in the scanning or surface, or simply because the paper was not placed completely flat when scanned.

The result will be auto-croped if the artifact "deskew:auto-crop" is defined, while the amount the image is to be deskewed, in degrees is also saved as the artifact "deskew:angle".

If the artifact "deskew:auto-crop" is given the image will be automatically cropped of the excess background. The value is the border width of all pixels around the edge that will be used to determine an average border color for the automatic trim.

The format of the DeskewImage method is:

Image *DeskewImage(const Image *image,const double threshold,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
threshold
separate background from foreground.
exception
return any errors or warnings in this structure.

IntegralRotateImage

IntegralRotateImage() rotates the image an integral of 90 degrees. It allocates the memory necessary for the new Image structure and returns a pointer to the rotated image.

The format of the IntegralRotateImage method is:

Image *IntegralRotateImage(const Image *image,size_t rotations,
  ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

rotations

Specifies the number of 90 degree rotations.

ShearImage

ShearImage() creates a new image that is a shear_image copy of an existing one. 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 amount of the shear is controlled by a shear angle. For X direction shears, x_shear is measured relative to the Y axis, and similarly, for Y direction shears y_shear is measured relative to the X axis. Empty triangles left over from shearing the image are filled with the background color defined by member 'background_color' of the image.. ShearImage() allocates the memory necessary for the new Image structure and returns a pointer to the new image.

ShearImage() is based on the paper "A Fast Algorithm for General Raster Rotatation" by Alan W. Paeth.

The format of the ShearImage method is:

Image *ShearImage(const Image *image,const double x_shear,
  const double y_shear,ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

x_shear, y_shear

Specifies the number of degrees to shear the image.

exception

return any errors or warnings in this structure.

ShearRotateImage

ShearRotateImage() creates a new image that is a rotated copy of an existing one. Positive angles rotate counter-clockwise (right-hand rule), while negative angles rotate clockwise. Rotated images are usually larger than the originals and have 'empty' triangular corners. X axis. Empty triangles left over from shearing the image are filled with the background color defined by member 'background_color' of the image. ShearRotateImage allocates the memory necessary for the new Image structure and returns a pointer to the new image.

ShearRotateImage() is based on the paper "A Fast Algorithm for General Raster Rotatation" by Alan W. Paeth. ShearRotateImage is adapted from a similar method based on the Paeth paper written by Michael Halle of the Spatial Imaging Group, MIT Media Lab.

The format of the ShearRotateImage method is:

Image *ShearRotateImage(const Image *image,const double degrees,
  ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

degrees

Specifies the number of degrees to rotate the image.

exception

return any errors or warnings in this structure.

ImageMagick: MagickCore, C API for ImageMagick: Image Distortions

AffineTransformImageDistortImageRotateImageSparseColorImage

AffineTransformImage

AffineTransformImage() transforms an image as dictated by the affine matrix. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

The format of the AffineTransformImage method is:

Image *AffineTransformImage(const Image *image,
  AffineMatrix *affine_matrix,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
affine_matrix
the affine matrix.
exception
return any errors or warnings in this structure.

DistortImage

DistortImage() distorts an image using various distortion methods, by mapping color lookups of the source image to a new destination image usally of the same size as the source image, unless 'bestfit' is set to true.

If 'bestfit' is enabled, and distortion allows it, the destination image is adjusted to ensure the whole source 'image' will just fit within the final destination image, which will be sized and offset accordingly. Also in many cases the virtual offset of the source image will be taken into account in the mapping.

If the '-verbose' control option has been set print to standard error the equicelent '-fx' formula with coefficients for the function, if practical.

The format of the DistortImage() method is:

Image *DistortImage(const Image *image,const DistortImageMethod method,
  const size_t number_arguments,const double *arguments,
  MagickBooleanType bestfit, ExceptionInfo *exception)

A description of each parameter follows:

image
the image to be distorted.
method
the method of image distortion.
ArcDistortion always ignores source image offset, and always 'bestfit' the destination image with the top left corner offset relative to the polar mapping center.
Affine, Perspective, and Bilinear, do least squares fitting of the distrotion when more than the minimum number of control point pairs are provided.
Perspective, and Bilinear, fall back to a Affine distortion when less than 4 control point pairs are provided. While Affine distortions let you use any number of control point pairs, that is Zero pairs is a No-Op (viewport only) distortion, one pair is a translation and two pairs of control points do a scale-rotate-translate, without any shearing.
number_arguments
the number of arguments given.
arguments
an array of floating point arguments for this method.
bestfit
Attempt to 'bestfit' the size of the resulting image. This also forces the resulting image to be a 'layered' virtual canvas image. Can be overridden using 'distort:viewport' setting.
exception
return any errors or warnings in this structure
Extra Controls from Image meta-data (artifacts)...
o "verbose" Output to stderr alternatives, internal coefficents, and FX equivalents for the distortion operation (if feasible). This forms an extra check of the distortion method, and allows users access to the internal constants IM calculates for the distortion.
o "distort:viewport" Directly set the output image canvas area and offest to use for the resulting image, rather than use the original images canvas, or a calculated 'bestfit' canvas.
o "distort:scale" Scale the size of the output canvas by this amount to provide a method of Zooming, and for super-sampling the results.
Other settings that can effect results include
o 'interpolate' For source image lookups (scale enlargements)
o 'filter' Set filter to use for area-resampling (scale shrinking). Set to 'point' to turn off and use 'interpolate' lookup instead

RotateImage

RotateImage() creates a new image that is a rotated copy of an existing one. Positive angles rotate counter-clockwise (right-hand rule), while negative angles rotate clockwise. Rotated images are usually larger than the originals and have 'empty' triangular corners. X axis. Empty triangles left over from shearing the image are filled with the background color defined by member 'background_color' of the image. RotateImage allocates the memory necessary for the new Image structure and returns a pointer to the new image.

The format of the RotateImage method is:

Image *RotateImage(const Image *image,const double degrees,
  ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

degrees

Specifies the number of degrees to rotate the image.

exception

return any errors or warnings in this structure.

SparseColorImage

SparseColorImage(), given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods.

The format of the SparseColorImage() method is:

Image *SparseColorImage(const Image *image,
  const SparseColorMethod method,const size_t number_arguments,
  const double *arguments,ExceptionInfo *exception)

A description of each parameter follows:

image
the image to be filled in.
method
the method to fill in the gradient between the control points.
The methods used for SparseColor() are often simular to methods used for DistortImage(), and even share the same code for determination of the function coefficents, though with more dimensions (or resulting values).
number_arguments
the number of arguments given.
arguments
array of floating point arguments for this method-- x,y,color_values-- with color_values given as normalized values.
exception
return any errors or warnings in this structure
ImageMagick: MagickCore, C API for ImageMagick: Memory Allocation

AcquireAlignedMemoryAcquireMagickMemoryAcquireQuantumMemoryAcquireVirtualMemoryCopyMagickMemoryGetMagickMemoryMethodsGetVirtualMemoryBlobRelinquishAlignedMemoryRelinquishMagickMemoryRelinquishVirtualMemoryResetMagickMemoryResizeMagickMemoryResizeQuantumMemorySetMagickMemoryMethods

AcquireAlignedMemory

AcquireAlignedMemory() returns a pointer to a block of memory at least size bytes whose address is a multiple of 16*sizeof(void *).

The format of the AcquireAlignedMemory method is:

void *AcquireAlignedMemory(const size_t count,const size_t quantum)

A description of each parameter follows:

count
the number of quantum elements to allocate.
quantum
the number of bytes in each quantum.

AcquireMagickMemory

AcquireMagickMemory() returns a pointer to a block of memory at least size bytes suitably aligned for any use.

The format of the AcquireMagickMemory method is:

void *AcquireMagickMemory(const size_t size)

A description of each parameter follows:

size
the size of the memory in bytes to allocate.

AcquireQuantumMemory

AcquireQuantumMemory() returns a pointer to a block of memory at least count * quantum bytes suitably aligned for any use.

The format of the AcquireQuantumMemory method is:

void *AcquireQuantumMemory(const size_t count,const size_t quantum)

A description of each parameter follows:

count
the number of quantum elements to allocate.
quantum
the number of bytes in each quantum.

AcquireVirtualMemory

AcquireVirtualMemory() allocates a pointer to a block of memory at least size bytes suitably aligned for any use.

The format of the AcquireVirtualMemory method is:

MemoryInfo *AcquireVirtualMemory(const size_t count,const size_t quantum)

A description of each parameter follows:

count
the number of quantum elements to allocate.
quantum
the number of bytes in each quantum.

CopyMagickMemory

CopyMagickMemory() copies size bytes from memory area source to the destination. Copying between objects that overlap will take place correctly. It returns destination.

The format of the CopyMagickMemory method is:

void *CopyMagickMemory(void *destination,const void *source,
  const size_t size)

A description of each parameter follows:

destination
the destination.
source
the source.
size
the size of the memory in bytes to allocate.

GetMagickMemoryMethods

GetMagickMemoryMethods() gets the methods to acquire, resize, and destroy memory.

The format of the GetMagickMemoryMethods() method is:

void GetMagickMemoryMethods(AcquireMemoryHandler *acquire_memory_handler,
  ResizeMemoryHandler *resize_memory_handler,
  DestroyMemoryHandler *destroy_memory_handler)

A description of each parameter follows:

acquire_memory_handler
method to acquire memory (e.g. malloc).
resize_memory_handler
method to resize memory (e.g. realloc).
destroy_memory_handler
method to destroy memory (e.g. free).

GetVirtualMemoryBlob

GetVirtualMemoryBlob() returns the virtual memory blob associated with the specified MemoryInfo structure.

The format of the GetVirtualMemoryBlob method is:

void *GetVirtualMemoryBlob(const MemoryInfo *memory_info)

A description of each parameter follows:

memory_info
The MemoryInfo structure.

RelinquishAlignedMemory

RelinquishAlignedMemory() frees memory acquired with AcquireAlignedMemory() or reuse.

The format of the RelinquishAlignedMemory method is:

void *RelinquishAlignedMemory(void *memory)

A description of each parameter follows:

memory
A pointer to a block of memory to free for reuse.

RelinquishMagickMemory

RelinquishMagickMemory() frees memory acquired with AcquireMagickMemory() or AcquireQuantumMemory() for reuse.

The format of the RelinquishMagickMemory method is:

void *RelinquishMagickMemory(void *memory)

A description of each parameter follows:

memory
A pointer to a block of memory to free for reuse.

RelinquishVirtualMemory

RelinquishVirtualMemory() frees memory acquired with AcquireVirtualMemory().

The format of the RelinquishVirtualMemory method is:

MemoryInfo *RelinquishVirtualMemory(MemoryInfo *memory_info)

A description of each parameter follows:

memory_info
A pointer to a block of memory to free for reuse.

ResetMagickMemory

ResetMagickMemory() fills the first size bytes of the memory area pointed to by memory with the constant byte c.

The format of the ResetMagickMemory method is:

void *ResetMagickMemory(void *memory,int byte,const size_t size)

A description of each parameter follows:

memory
a pointer to a memory allocation.
byte
set the memory to this value.
size
size of the memory to reset.

ResizeMagickMemory

ResizeMagickMemory() changes the size of the memory and returns a pointer to the (possibly moved) block. The contents will be unchanged up to the lesser of the new and old sizes.

The format of the ResizeMagickMemory method is:

void *ResizeMagickMemory(void *memory,const size_t size)

A description of each parameter follows:

memory
A pointer to a memory allocation.
size
the new size of the allocated memory.

ResizeQuantumMemory

ResizeQuantumMemory() changes the size of the memory and returns a pointer to the (possibly moved) block. The contents will be unchanged up to the lesser of the new and old sizes.

The format of the ResizeQuantumMemory method is:

void *ResizeQuantumMemory(void *memory,const size_t count,
  const size_t quantum)

A description of each parameter follows:

memory
A pointer to a memory allocation.
count
the number of quantum elements to allocate.
quantum
the number of bytes in each quantum.

SetMagickMemoryMethods

SetMagickMemoryMethods() sets the methods to acquire, resize, and destroy memory. Your custom memory methods must be set prior to the MagickCoreGenesis() method.

The format of the SetMagickMemoryMethods() method is:

SetMagickMemoryMethods(AcquireMemoryHandler acquire_memory_handler,
  ResizeMemoryHandler resize_memory_handler,
  DestroyMemoryHandler destroy_memory_handler)

A description of each parameter follows:

acquire_memory_handler
method to acquire memory (e.g. malloc).
resize_memory_handler
method to resize memory (e.g. realloc).
destroy_memory_handler
method to destroy memory (e.g. free).
ImageMagick: MagickCore, C API for ImageMagick: Image Histograms

GetImageHistogramIdentifyPaletteImageIsHistogramImageIsPaletteImageMinMaxStretchImageGetNumberColorsUniqueImageColors

GetImageHistogram

GetImageHistogram() returns the unique colors in an image.

The format of the GetImageHistogram method is:

size_t GetImageHistogram(const Image *image,
  size_t *number_colors,ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

file

Write a histogram of the color distribution to this file handle.

exception

return any errors or warnings in this structure.

IdentifyPaletteImage

IdentifyPaletteImage() returns MagickTrue if the image has 256 unique colors or less.

The format of the IdentifyPaletteImage method is:

MagickBooleanType IdentifyPaletteImage(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

exception

return any errors or warnings in this structure.

IsHistogramImage

IsHistogramImage() returns MagickTrue if the image has 1024 unique colors or less.

The format of the IsHistogramImage method is:

MagickBooleanType IsHistogramImage(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

exception

return any errors or warnings in this structure.

IsPaletteImage

IsPaletteImage() returns MagickTrue if the image is PseudoClass and has 256 unique colors or less.

The format of the IsPaletteImage method is:

MagickBooleanType IsPaletteImage(const Image *image)

A description of each parameter follows.

image

the image.

MinMaxStretchImage

MinMaxStretchImage() uses the exact minimum and maximum values found in each of the channels given, as the BlackPoint and WhitePoint to linearly stretch the colors (and histogram) of the image. The stretch points are also moved further inward by the adjustment values given.

If the adjustment values are both zero this function is equivalent to a perfect normalization (or autolevel) of the image.

Each channel is stretched independantally of each other (producing color distortion) unless the special 'SyncChannels' flag is also provided in the channels setting. If this flag is present the minimum and maximum point will be extracted from all the given channels, and those channels will be stretched by exactly the same amount (preventing color distortion).

In the special case that only ONE value is found in a channel of the image that value is not stretched, that value is left as is.

The 'SyncChannels' is turned on in the 'DefaultChannels' setting by default.

The format of the MinMaxStretchImage method is:

MagickBooleanType MinMaxStretchImage(Image *image,const double black,
  const double white,const double gamma,ExceptionInfo *exception)

A description of each parameter follows:

image
The image to auto-level
black, white
move the black / white point inward from the minimum and maximum points by this color value.
gamma
the gamma.
exception
return any errors or warnings in this structure.

GetNumberColors

GetNumberColors() returns the number of unique colors in an image.

The format of the GetNumberColors method is:

size_t GetNumberColors(const Image *image,FILE *file,
  ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

file

Write a histogram of the color distribution to this file handle.

exception

return any errors or warnings in this structure.

UniqueImageColors

UniqueImageColors() returns the unique colors of an image.

The format of the UniqueImageColors method is:

Image *UniqueImageColors(const Image *image,ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

exception

return any errors or warnings in this structure.

ImageMagick: MagickCore, C API for ImageMagick: Set Text Attributes

GetImageDepthGetImageQuantumDepthGetImageTypeIdentifyImageGrayIdentifyImageMonochromeIdentifyImageTypeIsImageGrayIsImageMonochromeIsImageOpaqueSetImageDepthSetImageType

GetImageDepth

GetImageDepth() returns the depth of a particular image channel.

The format of the GetImageDepth method is:

size_t GetImageDepth(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

GetImageQuantumDepth

GetImageQuantumDepth() returns the depth of the image rounded to a legal quantum depth: 8, 16, or 32.

The format of the GetImageQuantumDepth method is:

size_t GetImageQuantumDepth(const Image *image,
  const MagickBooleanType constrain)

A description of each parameter follows:

image
the image.
constrain
A value other than MagickFalse, constrains the depth to a maximum of MAGICKCORE_QUANTUM_DEPTH.

GetImageType

GetImageType() returns the type of image:

Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte

The format of the GetImageType method is:

ImageType GetImageType(const Image *image)

A description of each parameter follows:

image
the image.

IdentifyImageGray

IdentifyImageGray() returns grayscale if all the pixels in the image have the same red, green, and blue intensities, and bi-level is the intensity is either 0 or QuantumRange. Otherwise undefined is returned.

The format of the IdentifyImageGray method is:

ImageType IdentifyImageGray(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

IdentifyImageMonochrome

IdentifyImageMonochrome() returns MagickTrue if all the pixels in the image have the same red, green, and blue intensities and the intensity is either 0 or QuantumRange.

The format of the IdentifyImageMonochrome method is:

MagickBooleanType IdentifyImageMonochrome(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

IdentifyImageType

IdentifyImageType() returns the potential type of image:

Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte

To ensure the image type matches its potential, use SetImageType():

    (void) SetImageType(image,IdentifyImageType(image,exception),exception);

The format of the IdentifyImageType method is:

ImageType IdentifyImageType(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

IsImageGray

IsImageGray() returns MagickTrue if the type of the image is grayscale or bi-level.

The format of the IsImageGray method is:

MagickBooleanType IsImageGray(const Image *image)

A description of each parameter follows:

image
the image.

IsImageMonochrome

IsImageMonochrome() returns MagickTrue if type of the image is bi-level.

The format of the IsImageMonochrome method is:

MagickBooleanType IsImageMonochrome(const Image *image)

A description of each parameter follows:

image
the image.

IsImageOpaque

IsImageOpaque() returns MagickTrue if none of the pixels in the image have an alpha value other than OpaqueAlpha (QuantumRange).

Will return true immediatally is alpha channel is not available.

The format of the IsImageOpaque method is:

MagickBooleanType IsImageOpaque(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

SetImageDepth

SetImageDepth() sets the depth of the image.

The format of the SetImageDepth method is:

MagickBooleanType SetImageDepth(Image *image,const size_t depth,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
channel
the channel.
depth
the image depth.
exception
return any errors or warnings in this structure.

SetImageType

SetImageType() sets the type of image. Choose from these types:

Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte OptimizeType

The format of the SetImageType method is:

MagickBooleanType SetImageType(Image *image,const ImageType type,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
type
Image type.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Interactively Animate an Image Sequence

AnimateImages

AnimateImages

AnimateImages() repeatedly displays an image sequence to any X window screen. It returns a value other than 0 if successful. Check the exception member of image to determine the reason for any failure.

The format of the AnimateImages method is:

MagickBooleanType AnimateImages(const ImageInfo *image_info,
  Image *images,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
image
the image.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: The Image Registry

DefineImageRegistryDeleteImageRegistryGetImageRegistryGetNextImageRegistryRegistryComponentTerminusRemoveImageRegistryResetImageRegistryIteratorSetImageRegistry

DefineImageRegistry

DefineImageRegistry() associates a key/value pair with the image registry.

The format of the DefineImageRegistry method is:

MagickBooleanType DefineImageRegistry(const RegistryType type,
  const char *option,ExceptionInfo *exception)

A description of each parameter follows:

type
the type.
option
the option.
exception
the exception.

DeleteImageRegistry

DeleteImageRegistry() deletes a key from the image registry.

The format of the DeleteImageRegistry method is:

MagickBooleanType DeleteImageRegistry(const char *key)

A description of each parameter follows:

key
the registry.

GetImageRegistry

GetImageRegistry() returns a value associated with an image registry key.

The format of the GetImageRegistry method is:

void *GetImageRegistry(const RegistryType type,const char *key,
  ExceptionInfo *exception)

A description of each parameter follows:

type
the type.
key
the key.
exception
the exception.

GetNextImageRegistry

GetNextImageRegistry() gets the next image registry value.

The format of the GetNextImageRegistry method is:

char *GetNextImageRegistry(void)

RegistryComponentTerminus

RegistryComponentTerminus() destroys the registry component.

The format of the DestroyDefines method is:

void RegistryComponentTerminus(void)

RemoveImageRegistry

RemoveImageRegistry() removes a key from the image registry and returns its value.

The format of the RemoveImageRegistry method is:

void *RemoveImageRegistry(const char *key)

A description of each parameter follows:

key
the registry.

ResetImageRegistryIterator

ResetImageRegistryIterator() resets the registry iterator. Use it in conjunction with GetNextImageRegistry() to iterate over all the values in the image registry.

The format of the ResetImageRegistryIterator method is:

ResetImageRegistryIterator(void)

SetImageRegistry

SetImageRegistry() associates a value with an image registry key.

The format of the SetImageRegistry method is:

MagickBooleanType SetImageRegistry(const RegistryType type,
  const char *key,const void *value,ExceptionInfo *exception)

A description of each parameter follows:

type
the type.
key
the key.
value
the value.
exception
the exception.
ImageMagick: MagickCore, C API for ImageMagick: Segment an Image with Thresholding Fuzzy c-Means

SegmentImage

SegmentImage

SegmentImage() segment an image by analyzing the histograms of the color components and identifying units that are homogeneous with the fuzzy C-means technique.

The format of the SegmentImage method is:

MagickBooleanType SegmentImage(Image *image,
  const ColorspaceType colorspace,const MagickBooleanType verbose,
  const double cluster_threshold,const double smooth_threshold,
  ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

colorspace

Indicate the colorspace.

verbose

Set to MagickTrue to print detailed information about the identified classes.

cluster_threshold

This represents the minimum number of pixels contained in a hexahedra before it can be considered valid (expressed as a percentage).

smooth_threshold

the smoothing threshold eliminates noise in the second derivative of the histogram. As the value is increased, you can expect a smoother second derivative.

exception

return any errors or warnings in this structure.

ImageMagick: MagickCore, C API for ImageMagick: Constitute an Image

ConstituteImagePingImagePingImagesReadImageReadImagesWriteImageWriteImages

ConstituteImage

ConstituteImage() returns an image from the pixel data you supply. The pixel data must be in scanline order top-to-bottom. The data can be char, short int, int, float, or double. Float and double require the pixels to be normalized [0..1], otherwise [0..QuantumRange]. For example, to create a 640x480 image from unsigned red-green-blue character data, use:

image = ConstituteImage(640,480,"RGB",CharPixel,pixels,&exception);

The format of the ConstituteImage method is:

Image *ConstituteImage(const size_t columns,const size_t rows,
  const char *map,const StorageType storage,const void *pixels,
  ExceptionInfo *exception)

A description of each parameter follows:

columns
width in pixels of the image.
rows
height in pixels of the image.
map
This string reflects the expected ordering of the pixel array. It can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), O = opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad.
storage
Define the data type of the pixels. Float and double types are expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from these types: CharPixel, DoublePixel, FloatPixel, IntegerPixel, LongPixel, QuantumPixel, or ShortPixel.
pixels
This array of values contain the pixel components as defined by map and type. You must preallocate this array where the expected length varies depending on the values of width, height, map, and type.
exception
return any errors or warnings in this structure.

PingImage

PingImage() returns all the properties of an image or image sequence except for the pixels. It is much faster and consumes far less memory than ReadImage(). On failure, a NULL image is returned and exception describes the reason for the failure.

The format of the PingImage method is:

Image *PingImage(const ImageInfo *image_info,ExceptionInfo *exception)

A description of each parameter follows:

image_info
Ping the image defined by the file or filename members of this structure.
exception
return any errors or warnings in this structure.

PingImages

PingImages() pings one or more images and returns them as an image list.

The format of the PingImage method is:

Image *PingImages(ImageInfo *image_info,const char *filename,
  ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
filename
the image filename.
exception
return any errors or warnings in this structure.

ReadImage

ReadImage() reads an image or image sequence from a file or file handle. The method returns a NULL if there is a memory shortage or if the image cannot be read. On failure, a NULL image is returned and exception describes the reason for the failure.

The format of the ReadImage method is:

Image *ReadImage(const ImageInfo *image_info,ExceptionInfo *exception)

A description of each parameter follows:

image_info
Read the image defined by the file or filename members of this structure.
exception
return any errors or warnings in this structure.

ReadImages

ReadImages() reads one or more images and returns them as an image list.

The format of the ReadImage method is:

Image *ReadImages(ImageInfo *image_info,const char *filename,
  ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
filename
the image filename.
exception
return any errors or warnings in this structure.

WriteImage

WriteImage() writes an image or an image sequence to a file or file handle. If writing to a file is on disk, the name is defined by the filename member of the image structure. WriteImage() returns MagickFalse is there is a memory shortage or if the image cannot be written. Check the exception member of image to determine the cause for any failure.

The format of the WriteImage method is:

MagickBooleanType WriteImage(const ImageInfo *image_info,Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
image
the image.
exception
return any errors or warnings in this structure.

WriteImages

WriteImages() writes an image sequence into one or more files. While WriteImage() can write an image sequence, it is limited to writing the sequence into a single file using a format which supports multiple frames. WriteImages(), however, does not have this limitation, instead it generates multiple output files if necessary (or when requested). When ImageInfo's adjoin flag is set to MagickFalse, the file name is expected to include a printf-style formatting string for the frame number (e.g. "image02d.png").

The format of the WriteImages method is:

MagickBooleanType WriteImages(const ImageInfo *image_info,Image *images,
  const char *filename,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
images
the image list.
filename
the image filename.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Deprecated Methods

ImageMagick: MagickCore, C API for ImageMagick: Convert to and from Cipher Pixels

AcquireAESInfoDestroyAESInfoEncipherAESBlockPasskeyDecipherImagePasskeyEncipherImageSetAESKeyPasskeyDecipherImagePasskeyEncipherImage

AcquireAESInfo

AcquireAESInfo() allocate the AESInfo structure.

The format of the AcquireAESInfo method is:

AESInfo *AcquireAESInfo(void)

DestroyAESInfo

DestroyAESInfo() zeros memory associated with the AESInfo structure.

The format of the DestroyAESInfo method is:

AESInfo *DestroyAESInfo(AESInfo *aes_info)

A description of each parameter follows:

aes_info
the cipher context.

EncipherAESBlock

EncipherAESBlock() enciphers a single block of plaintext to produce a block of ciphertext.

The format of the EncipherAESBlock method is:

void EncipherAES(AESInfo *aes_info,const unsigned char *plaintext,
  unsigned char *ciphertext)

A description of each parameter follows:

aes_info
the cipher context.
plaintext
the plain text.
ciphertext
the cipher text.

PasskeyDecipherImage

PasskeyDecipherImage() converts cipher pixels to plain pixels.

The format of the PasskeyDecipherImage method is:

MagickBooleanType PasskeyDecipherImage(Image *image,
  const StringInfo *passkey,ExceptionInfo *exception)
MagickBooleanType DecipherImage(Image *image,const char *passphrase,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
passphrase
decipher cipher pixels with this passphrase.
passkey
decrypt cipher pixels with this passkey.
exception
return any errors or warnings in this structure.

PasskeyEncipherImage

PasskeyEncipherImage() converts pixels to cipher-pixels.

The format of the PasskeyEncipherImage method is:

MagickBooleanType PasskeyEncipherImage(Image *image,
  const StringInfo *passkey,ExceptionInfo *exception)
MagickBooleanType EncipherImage(Image *image,const char *passphrase,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
passphrase
encipher pixels with this passphrase.
passkey
decrypt cipher pixels with this passkey.
exception
return any errors or warnings in this structure.

SetAESKey

SetAESKey() sets the key for the AES cipher. The key length is specified in bits. Valid values are 128, 192, or 256 requiring a key buffer length in bytes of 16, 24, and 32 respectively.

The format of the SetAESKey method is:

SetAESKey(AESInfo *aes_info,const StringInfo *key)

A description of each parameter follows:

aes_info
the cipher context.
key
the key.

PasskeyDecipherImage

PasskeyDecipherImage() converts cipher pixels to plain pixels.

The format of the PasskeyDecipherImage method is:

MagickBooleanType PasskeyDecipherImage(Image *image,
  const StringInfo *passkey,ExceptionInfo *exception)
MagickBooleanType DecipherImage(Image *image,const char *passphrase,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
passphrase
decipher cipher pixels with this passphrase.
passkey
decrypt cipher pixels with this passkey.
exception
return any errors or warnings in this structure.

PasskeyEncipherImage

PasskeyEncipherImage() converts pixels to cipher-pixels.

The format of the PasskeyEncipherImage method is:

MagickBooleanType PasskeyEncipherImage(Image *image,
  const StringInfo *passkey,ExceptionInfo *exception)
MagickBooleanType EncipherImage(Image *image,const char *passphrase,
  ExceptionInfo *exception)

A description of each parameter follows:

passphrase
decipher cipher pixels with this passphrase.
passkey
decrypt cipher pixels with this passkey.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Dealing with Image Colorspaces

SetImageColorspaceSetImageGraySetImageMonochromeTransformImageColorspace

SetImageColorspace

SetImageColorspace() sets the colorspace member of the Image structure.

The format of the SetImageColorspace method is:

MagickBooleanType SetImageColorspace(Image *image,
  const ColorspaceType colorspace,ExceptiionInfo *exception)

A description of each parameter follows:

image
the image.
colorspace
the colorspace.
exception
return any errors or warnings in this structure.

SetImageGray

SetImageGray() returns MagickTrue if all the pixels in the image have the same red, green, and blue intensities and changes the type of the image to bi-level or grayscale.

The format of the SetImageGray method is:

MagickBooleanType SetImageGray(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

SetImageMonochrome

SetImageMonochrome() returns MagickTrue if all the pixels in the image have the same red, green, and blue intensities and the intensity is either 0 or QuantumRange and changes the type of the image to bi-level.

The format of the SetImageMonochrome method is:

MagickBooleanType SetImageMonochrome(Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

TransformImageColorspace

TransformImageColorspace() transforms an image colorspace, changing the image data to reflect the new colorspace.

The format of the TransformImageColorspace method is:

MagickBooleanType TransformImageColorspace(Image *image,
  const ColorspaceType colorspace,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
colorspace
the colorspace.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Morphological Erosions, Dilations, Openings, and Closings

AcquireKernelInfoAcquireKernelBuiltInCloneKernelInfoDestroyKernelInfoMorphologyApplyThis is almost identical to the MorphologyPrimativeMorphologyImageScaleGeometryKernelInfoScaleKernelInfoShowKernelInfoUnityAddKernelInfoZeroKernelNans

AcquireKernelInfo

AcquireKernelInfo() takes the given string (generally supplied by the user) and converts it into a Morphology/Convolution Kernel. This allows users to specify a kernel from a number of pre-defined kernels, or to fully specify their own kernel for a specific Convolution or Morphology Operation.

The kernel so generated can be any rectangular array of floating point values (doubles) with the 'control point' or 'pixel being affected' anywhere within that array of values.

Previously IM was restricted to a square of odd size using the exact center as origin, this is no longer the case, and any rectangular kernel with any value being declared the origin. This in turn allows the use of highly asymmetrical kernels.

The floating point values in the kernel can also include a special value known as 'nan' or 'not a number' to indicate that this value is not part of the kernel array. This allows you to shaped the kernel within its rectangular area. That is 'nan' values provide a 'mask' for the kernel shape. However at least one non-nan value must be provided for correct working of a kernel.

The returned kernel should be freed using the DestroyKernelInfo() when you are finished with it. Do not free this memory yourself.

Input kernel defintion strings can consist of any of three types.

"name:args[[@><]" Select from one of the built in kernels, using the name and geometry arguments supplied. See AcquireKernelBuiltIn()

"WxH[+X+Y][@><]:num, num, num ..." a kernel of size W by H, with W*H floating point numbers following. the 'center' can be optionally be defined at +X+Y (such that +0+0 is top left corner). If not defined the pixel in the center, for odd sizes, or to the immediate top or left of center for even sizes is automatically selected.

"num, num, num, num, ..." list of floating point numbers defining an 'old style' odd sized square kernel. At least 9 values should be provided for a 3x3 square kernel, 25 for a 5x5 square kernel, 49 for 7x7, etc. Values can be space or comma separated. This is not recommended.

You can define a 'list of kernels' which can be used by some morphology operators A list is defined as a semi-colon separated list kernels.

" kernel ; kernel ; kernel ; "

Any extra ';' characters, at start, end or between kernel defintions are simply ignored.

The special flags will expand a single kernel, into a list of rotated kernels. A '@' flag will expand a 3x3 kernel into a list of 45-degree cyclic rotations, while a '>' will generate a list of 90-degree rotations. The '<' also exands using 90-degree rotates, but giving a 180-degree reflected kernel before the +/- 90-degree rotations, which can be important for Thinning operations.

Note that 'name' kernels will start with an alphabetic character while the new kernel specification has a ':' character in its specification string. If neither is the case, it is assumed an old style of a simple list of numbers generating a odd-sized square kernel has been given.

The format of the AcquireKernal method is:

KernelInfo *AcquireKernelInfo(const char *kernel_string)

A description of each parameter follows:

kernel_string
the Morphology/Convolution kernel wanted.

AcquireKernelBuiltIn

AcquireKernelBuiltIn() returned one of the 'named' built-in types of kernels used for special purposes such as gaussian blurring, skeleton pruning, and edge distance determination.

They take a KernelType, and a set of geometry style arguments, which were typically decoded from a user supplied string, or from a more complex Morphology Method that was requested.

The format of the AcquireKernalBuiltIn method is:

KernelInfo *AcquireKernelBuiltIn(const KernelInfoType type,
     const GeometryInfo args)

A description of each parameter follows:

type
the pre-defined type of kernel wanted
args
arguments defining or modifying the kernel
Convolution Kernels
Unity The a No-Op or Scaling single element kernel.
Gaussian:{radius},{sigma} Generate a two-dimensional gaussian kernel, as used by -gaussian. The sigma for the curve is required. The resulting kernel is normalized,
If 'sigma' is zero, you get a single pixel on a field of zeros.
NOTE: that the 'radius' is optional, but if provided can limit (clip) the final size of the resulting kernel to a square 2*radius+1 in size. The radius should be at least 2 times that of the sigma value, or sever clipping and aliasing may result. If not given or set to 0 the radius will be determined so as to produce the best minimal error result, which is usally much larger than is normally needed.
LoG:{radius},{sigma} "Laplacian of a Gaussian" or "Mexician Hat" Kernel. The supposed ideal edge detection, zero-summing kernel.
An alturnative to this kernel is to use a "DoG" with a sigma ratio of approx 1.6 (according to wikipedia).
DoG:{radius},{sigma1},{sigma2} "Difference of Gaussians" Kernel. As "Gaussian" but with a gaussian produced by 'sigma2' subtracted from the gaussian produced by 'sigma1'. Typically sigma2 > sigma1. The result is a zero-summing kernel.
Blur:{radius},{sigma}[,{angle}] Generates a 1 dimensional or linear gaussian blur, at the angle given (current restricted to orthogonal angles). If a 'radius' is given the kernel is clipped to a width of 2*radius+1. Kernel can be rotated by a 90 degree angle.
If 'sigma' is zero, you get a single pixel on a field of zeros.
Note that two convolutions with two "Blur" kernels perpendicular to each other, is equivalent to a far larger "Gaussian" kernel with the same sigma value, However it is much faster to apply. This is how the "-blur" operator actually works.
Comet:{width},{sigma},{angle} Blur in one direction only, much like how a bright object leaves a comet like trail. The Kernel is actually half a gaussian curve, Adding two such blurs in opposite directions produces a Blur Kernel. Angle can be rotated in multiples of 90 degrees.
Note that the first argument is the width of the kernel and not the radius of the kernel.
Binomial:[{radius}] Generate a discrete kernel using a 2 dimentional Pascel's Triangle of values. Used for special forma of image filters.
# Still to be implemented... # # Filter2D # Filter1D # Set kernel values using a resize filter, and given scale (sigma) # Cylindrical or Linear. Is this possible with an image? #
Named Constant Convolution Kernels
All these are unscaled, zero-summing kernels by default. As such for non-HDRI version of ImageMagick some form of normalization, user scaling, and biasing the results is recommended, to prevent the resulting image being 'clipped'.
The 3x3 kernels (most of these) can be circularly rotated in multiples of 45 degrees to generate the 8 angled varients of each of the kernels.
Laplacian:{type} Discrete Lapacian Kernels, (without normalization) Type 0 : 3x3 with center:8 surounded by -1 (8 neighbourhood) Type 1 : 3x3 with center:4 edge:-1 corner:0 (4 neighbourhood) Type 2 : 3x3 with center:4 edge:1 corner:-2 Type 3 : 3x3 with center:4 edge:-2 corner:1 Type 5 : 5x5 laplacian Type 7 : 7x7 laplacian Type 15 : 5x5 LoG (sigma approx 1.4) Type 19 : 9x9 LoG (sigma approx 1.4)
Sobel:{angle} Sobel 'Edge' convolution kernel (3x3) | -1, 0, 1 | | -2, 0,-2 | | -1, 0, 1 |
Roberts:{angle} Roberts convolution kernel (3x3) | 0, 0, 0 | | -1, 1, 0 | | 0, 0, 0 |
Prewitt:{angle} Prewitt Edge convolution kernel (3x3) | -1, 0, 1 | | -1, 0, 1 | | -1, 0, 1 |
Compass:{angle} Prewitt's "Compass" convolution kernel (3x3) | -1, 1, 1 | | -1,-2, 1 | | -1, 1, 1 |
Kirsch:{angle} Kirsch's "Compass" convolution kernel (3x3) | -3,-3, 5 | | -3, 0, 5 | | -3,-3, 5 |
FreiChen:{angle} Frei-Chen Edge Detector is based on a kernel that is similar to the Sobel Kernel, but is designed to be isotropic. That is it takes into account the distance of the diagonal in the kernel.
| 1, 0, -1 | | sqrt(2), 0, -sqrt(2) | | 1, 0, -1 |
FreiChen:{type},{angle}
Frei-Chen Pre-weighted kernels...
Type 0: default un-nomalized version shown above.
Type 1: Orthogonal Kernel (same as type 11 below) | 1, 0, -1 | | sqrt(2), 0, -sqrt(2) | / 2*sqrt(2) | 1, 0, -1 |
Type 2: Diagonal form of Kernel... | 1, sqrt(2), 0 | | sqrt(2), 0, -sqrt(2) | / 2*sqrt(2) | 0, -sqrt(2) -1 |
However this kernel is als at the heart of the FreiChen Edge Detection Process which uses a set of 9 specially weighted kernel. These 9 kernels not be normalized, but directly applied to the image. The results is then added together, to produce the intensity of an edge in a specific direction. The square root of the pixel value can then be taken as the cosine of the edge, and at least 2 such runs at 90 degrees from each other, both the direction and the strength of the edge can be determined.
Type 10: All 9 of the following pre-weighted kernels...
Type 11: | 1, 0, -1 | | sqrt(2), 0, -sqrt(2) | / 2*sqrt(2) | 1, 0, -1 |
Type 12: | 1, sqrt(2), 1 | | 0, 0, 0 | / 2*sqrt(2) | 1, sqrt(2), 1 |
Type 13: | sqrt(2), -1, 0 | | -1, 0, 1 | / 2*sqrt(2) | 0, 1, -sqrt(2) |
Type 14: | 0, 1, -sqrt(2) | | -1, 0, 1 | / 2*sqrt(2) | sqrt(2), -1, 0 |
Type 15: | 0, -1, 0 | | 1, 0, 1 | / 2 | 0, -1, 0 |
Type 16: | 1, 0, -1 | | 0, 0, 0 | / 2 | -1, 0, 1 |
Type 17: | 1, -2, 1 | | -2, 4, -2 | / 6 | -1, -2, 1 |
Type 18: | -2, 1, -2 | | 1, 4, 1 | / 6 | -2, 1, -2 |
Type 19: | 1, 1, 1 | | 1, 1, 1 | / 3 | 1, 1, 1 |
The first 4 are for edge detection, the next 4 are for line detection and the last is to add a average component to the results.
Using a special type of '-1' will return all 9 pre-weighted kernels as a multi-kernel list, so that you can use them directly (without normalization) with the special "-set option:morphology:compose Plus" setting to apply the full FreiChen Edge Detection Technique.
If 'type' is large it will be taken to be an actual rotation angle for the default FreiChen (type 0) kernel. As such FreiChen:45 will look like a Sobel:45 but with 'sqrt(2)' instead of '2' values.
WARNING: The above was layed out as per http://www.math.tau.ac.il/~turkel/notes/edge_detectors.pdf But rotated 90 degrees so direction is from left rather than the top. I have yet to find any secondary confirmation of the above. The only other source found was actual source code at http://ltswww.epfl.ch/~courstiv/exos_labos/sol3.pdf Neigher paper defineds the kernels in a way that looks locical or correct when taken as a whole.
Boolean Kernels
Diamond:[{radius}[,{scale}]] Generate a diamond shaped kernel with given radius to the points. Kernel size will again be radius*2+1 square and defaults to radius 1, generating a 3x3 kernel that is slightly larger than a square.
Square:[{radius}[,{scale}]] Generate a square shaped kernel of size radius*2+1, and defaulting to a 3x3 (radius 1).
Octagon:[{radius}[,{scale}]] Generate octagonal shaped kernel of given radius and constant scale. Default radius is 3 producing a 7x7 kernel. A radius of 1 will result in "Diamond" kernel.
Disk:[{radius}[,{scale}]] Generate a binary disk, thresholded at the radius given, the radius may be a float-point value. Final Kernel size is floor(radius)*2+1 square. A radius of 5.3 is the default.
NOTE: That a low radii Disk kernels produce the same results as many of the previously defined kernels, but differ greatly at larger radii. Here is a table of equivalences... "Disk:1" => "Diamond", "Octagon:1", or "Cross:1" "Disk:1.5" => "Square" "Disk:2" => "Diamond:2" "Disk:2.5" => "Octagon" "Disk:2.9" => "Square:2" "Disk:3.5" => "Octagon:3" "Disk:4.5" => "Octagon:4" "Disk:5.4" => "Octagon:5" "Disk:6.4" => "Octagon:6" All other Disk shapes are unique to this kernel, but because a "Disk" is more circular when using a larger radius, using a larger radius is preferred over iterating the morphological operation.
Rectangle:{geometry} Simply generate a rectangle of 1's with the size given. You can also specify the location of the 'control point', otherwise the closest pixel to the center of the rectangle is selected.
Properly centered and odd sized rectangles work the best.
Symbol Dilation Kernels
These kernel is not a good general morphological kernel, but is used more for highlighting and marking any single pixels in an image using, a "Dilate" method as appropriate.
For the same reasons iterating these kernels does not produce the same result as using a larger radius for the symbol.
Plus:[{radius}[,{scale}]] Cross:[{radius}[,{scale}]] Generate a kernel in the shape of a 'plus' or a 'cross' with a each arm the length of the given radius (default 2).
NOTE: "plus:1" is equivalent to a "Diamond" kernel.
Ring:{radius1},{radius2}[,{scale}] A ring of the values given that falls between the two radii. Defaults to a ring of approximataly 3 radius in a 7x7 kernel. This is the 'edge' pixels of the default "Disk" kernel, More specifically, "Ring" -> "Ring:2.5,3.5,1.0"
Hit and Miss Kernels
Peak:radius1,radius2 Find any peak larger than the pixels the fall between the two radii. The default ring of pixels is as per "Ring". Edges Find flat orthogonal edges of a binary shape Corners Find 90 degree corners of a binary shape Diagonals:type A special kernel to thin the 'outside' of diagonals LineEnds:type Find end points of lines (for pruning a skeletion) Two types of lines ends (default to both) can be searched for Type 0: All line ends Type 1: single kernel for 4-conneected line ends Type 2: single kernel for simple line ends LineJunctions Find three line junctions (within a skeletion) Type 0: all line junctions Type 1: Y Junction kernel Type 2: Diagonal T Junction kernel Type 3: Orthogonal T Junction kernel Type 4: Diagonal X Junction kernel Type 5: Orthogonal + Junction kernel Ridges:type Find single pixel ridges or thin lines Type 1: Fine single pixel thick lines and ridges Type 2: Find two pixel thick lines and ridges ConvexHull Octagonal Thickening Kernel, to generate convex hulls of 45 degrees Skeleton:type Traditional skeleton generating kernels. Type 1: Tradional Skeleton kernel (4 connected skeleton) Type 2: HIPR2 Skeleton kernel (8 connected skeleton) Type 3: Thinning skeleton based on a ressearch paper by Dan S. Bloomberg (Default Type) ThinSE:type A huge variety of Thinning Kernels designed to preserve conectivity. many other kernel sets use these kernels as source definitions. Type numbers are 41-49, 81-89, 481, and 482 which are based on the super and sub notations used in the source research paper.
Distance Measuring Kernels
Different types of distance measuring methods, which are used with the a 'Distance' morphology method for generating a gradient based on distance from an edge of a binary shape, though there is a technique for handling a anti-aliased shape.
See the 'Distance' Morphological Method, for information of how it is applied.
Chebyshev:[{radius}][x{scale}[!]] Chebyshev Distance (also known as Tchebychev or Chessboard distance) is a value of one to any neighbour, orthogonal or diagonal. One why of thinking of it is the number of squares a 'King' or 'Queen' in chess needs to traverse reach any other position on a chess board. It results in a 'square' like distance function, but one where diagonals are given a value that is closer than expected.
Manhattan:[{radius}][x{scale}[!]] Manhattan Distance (also known as Rectilinear, City Block, or the Taxi Cab distance metric), it is the distance needed when you can only travel in horizontal or vertical directions only. It is the distance a 'Rook' in chess would have to travel, and results in a diamond like distances, where diagonals are further than expected.
Octagonal:[{radius}][x{scale}[!]] An interleving of Manhatten and Chebyshev metrics producing an increasing octagonally shaped distance. Distances matches those of the "Octagon" shaped kernel of the same radius. The minimum radius and default is 2, producing a 5x5 kernel.
Euclidean:[{radius}][x{scale}[!]] Euclidean distance is the 'direct' or 'as the crow flys' distance. However by default the kernel size only has a radius of 1, which limits the distance to 'Knight' like moves, with only orthogonal and diagonal measurements being correct. As such for the default kernel you will get octagonal like distance function.
However using a larger radius such as "Euclidean:4" you will get a much smoother distance gradient from the edge of the shape. Especially if the image is pre-processed to include any anti-aliasing pixels. Of course a larger kernel is slower to use, and not always needed.
The first three Distance Measuring Kernels will only generate distances of exact multiples of {scale} in binary images. As such you can use a scale of 1 without loosing any information. However you also need some scaling when handling non-binary anti-aliased shapes.
The "Euclidean" Distance Kernel however does generate a non-integer fractional results, and as such scaling is vital even for binary shapes.

CloneKernelInfo

CloneKernelInfo() creates a new clone of the given Kernel List so that its can be modified without effecting the original. The cloned kernel should be destroyed using DestoryKernelInfo() when no longer needed.

The format of the CloneKernelInfo method is:

KernelInfo *CloneKernelInfo(const KernelInfo *kernel)

A description of each parameter follows:

kernel
the Morphology/Convolution kernel to be cloned

DestroyKernelInfo

DestroyKernelInfo() frees the memory used by a Convolution/Morphology kernel.

The format of the DestroyKernelInfo method is:

KernelInfo *DestroyKernelInfo(KernelInfo *kernel)

A description of each parameter follows:

kernel
the Morphology/Convolution kernel to be destroyed

MorphologyApply

MorphologyApply() applies a morphological method, multiple times using a list of multiple kernels. This is the method that should be called by other 'operators' that internally use morphology operations as part of their processing.

It is basically equivalent to as MorphologyImage() (see below) but without any user controls. This allows internel programs to use this method to perform a specific task without possible interference by any API user supplied settings.

It is MorphologyImage() task to extract any such user controls, and pass them to this function for processing.

More specifically all given kernels should already be scaled, normalised, and blended appropriatally before being parred to this routine. The appropriate bias, and compose (typically 'UndefinedComposeOp') given.

The format of the MorphologyApply method is:

Image *MorphologyApply(const Image *image,MorphologyMethod method,
  const ssize_t iterations,const KernelInfo *kernel,
  const CompositeMethod compose,const double bias,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the source image
method
the morphology method to be applied.
iterations
apply the operation this many times (or no change). A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1.
channel
the channel type.
kernel
An array of double representing the morphology kernel.
compose
How to handle or merge multi-kernel results. If 'UndefinedCompositeOp' use default for the Morphology method. If 'NoCompositeOp' force image to be re-iterated by each kernel. Otherwise merge the results using the compose method given.
bias
Convolution Output Bias.
exception
return any errors or warnings in this structure.

This is almost identical to the MorphologyPrimative

This is almost identical to the MorphologyPrimative() function above, but applies the primitive directly to the actual image using two passes, once in each direction, with the results of the previous (and current) row being re-used.

That is after each row is 'Sync'ed' into the image, the next row makes use of those values as part of the calculation of the next row. It repeats, but going in the oppisite (bottom-up) direction.

Because of this 're-use of results' this function can not make use of multi- threaded, parellel processing.

MorphologyImage

MorphologyImage() applies a user supplied kernel to the image according to the given mophology method.

This function applies any and all user defined settings before calling the above internal function MorphologyApply().

User defined settings include... * Output Bias for Convolution and correlation ("-define convolve:bias=??") * Kernel Scale/normalize settings ("-define convolve:scale=??") This can also includes the addition of a scaled unity kernel. * Show Kernel being applied ("-define morphology:showkernel=1")

Other operators that do not want user supplied options interfering, especially "convolve:bias" and "morphology:showkernel" should use MorphologyApply() directly.

The format of the MorphologyImage method is:

Image *MorphologyImage(const Image *image,MorphologyMethod method,
  const ssize_t iterations,KernelInfo *kernel,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
method
the morphology method to be applied.
iterations
apply the operation this many times (or no change). A value of -1 means loop until no change found. How this is applied may depend on the morphology method. Typically this is a value of 1.
kernel
An array of double representing the morphology kernel. Warning: kernel may be normalized for the Convolve method.
exception
return any errors or warnings in this structure.

ScaleGeometryKernelInfo

ScaleGeometryKernelInfo() takes a geometry argument string, typically provided as a "-set option:convolve:scale {geometry}" user setting, and modifies the kernel according to the parsed arguments of that setting.

The first argument (and any normalization flags) are passed to ScaleKernelInfo() to scale/normalize the kernel. The second argument is then passed to UnityAddKernelInfo() to add a scled unity kernel into the scaled/normalized kernel.

The format of the ScaleGeometryKernelInfo method is:

void ScaleGeometryKernelInfo(KernelInfo *kernel,
  const double scaling_factor,const MagickStatusType normalize_flags)

A description of each parameter follows:

kernel
the Morphology/Convolution kernel to modify
o geometry:
       "-set option:convolve:scale {geometry}" setting.

ScaleKernelInfo

ScaleKernelInfo() scales the given kernel list by the given amount, with or without normalization of the sum of the kernel values (as per given flags).

By default (no flags given) the values within the kernel is scaled directly using given scaling factor without change.

If either of the two 'normalize_flags' are given the kernel will first be normalized and then further scaled by the scaling factor value given.

Kernel normalization ('normalize_flags' given) is designed to ensure that any use of the kernel scaling factor with 'Convolve' or 'Correlate' morphology methods will fall into -1.0 to +1.0 range. Note that for non-HDRI versions of IM this may cause images to have any negative results clipped, unless some 'bias' is used.

More specifically. Kernels which only contain positive values (such as a 'Gaussian' kernel) will be scaled so that those values sum to +1.0, ensuring a 0.0 to +1.0 output range for non-HDRI images.

For Kernels that contain some negative values, (such as 'Sharpen' kernels) the kernel will be scaled by the absolute of the sum of kernel values, so that it will generally fall within the +/- 1.0 range.

For kernels whose values sum to zero, (such as 'Laplician' kernels) kernel will be scaled by just the sum of the postive values, so that its output range will again fall into the +/- 1.0 range.

For special kernels designed for locating shapes using 'Correlate', (often only containing +1 and -1 values, representing foreground/brackground matching) a special normalization method is provided to scale the positive values separately to those of the negative values, so the kernel will be forced to become a zero-sum kernel better suited to such searches.

WARNING: Correct normalization of the kernel assumes that the '*_range' attributes within the kernel structure have been correctly set during the kernels creation.

NOTE: The values used for 'normalize_flags' have been selected specifically to match the use of geometry options, so that '!' means NormalizeValue, '^' means CorrelateNormalizeValue. All other GeometryFlags values are ignored.

The format of the ScaleKernelInfo method is:

void ScaleKernelInfo(KernelInfo *kernel, const double scaling_factor,
         const MagickStatusType normalize_flags )

A description of each parameter follows:

kernel
the Morphology/Convolution kernel
o scaling_factor:
       zero.  If the kernel is normalized regardless of any flags.

o normalize_flags:

       specifically: NormalizeValue, CorrelateNormalizeValue,
                     and/or PercentValue

ShowKernelInfo

ShowKernelInfo() outputs the details of the given kernel defination to standard error, generally due to a users 'morphology:showkernel' option request.

The format of the ShowKernel method is:

void ShowKernelInfo(const KernelInfo *kernel)

A description of each parameter follows:

kernel
the Morphology/Convolution kernel

UnityAddKernelInfo

UnityAddKernelInfo() Adds a given amount of the 'Unity' Convolution Kernel to the given pre-scaled and normalized Kernel. This in effect adds that amount of the original image into the resulting convolution kernel. This value is usually provided by the user as a percentage value in the 'convolve:scale' setting.

The resulting effect is to convert the defined kernels into blended soft-blurs, unsharp kernels or into sharpening kernels.

The format of the UnityAdditionKernelInfo method is:

void UnityAdditionKernelInfo(KernelInfo *kernel, const double scale )

A description of each parameter follows:

kernel
the Morphology/Convolution kernel
o scale:
       the given kernel.

ZeroKernelNans

ZeroKernelNans() replaces any special 'nan' value that may be present in the kernel with a zero value. This is typically done when the kernel will be used in special hardware (GPU) convolution processors, to simply matters.

The format of the ZeroKernelNans method is:

void ZeroKernelNans (KernelInfo *kernel)

A description of each parameter follows:

kernel
the Morphology/Convolution kernel
ImageMagick: MagickCore, C API for ImageMagick: Image Statistics

EvaluateImageFunctionImageGetImageEntropyGetImageExtremaGetImageKurtosisGetImageMeanGetImageMomentsGetImagePerceptualHashGetImageRangeGetImageStatisticsPolynomialImageStatisticImage

EvaluateImage

EvaluateImage() applies a value to the image with an arithmetic, relational, or logical operator to an image. Use these operations to lighten or darken an image, to increase or decrease contrast in an image, or to produce the "negative" of an image.

The format of the EvaluateImage method is:

MagickBooleanType EvaluateImage(Image *image,
  const MagickEvaluateOperator op,const double value,
  ExceptionInfo *exception)
MagickBooleanType EvaluateImages(Image *images,
  const MagickEvaluateOperator op,const double value,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
op
A channel op.
value
A value value.
exception
return any errors or warnings in this structure.

FunctionImage

FunctionImage() applies a value to the image with an arithmetic, relational, or logical operator to an image. Use these operations to lighten or darken an image, to increase or decrease contrast in an image, or to produce the "negative" of an image.

The format of the FunctionImage method is:

MagickBooleanType FunctionImage(Image *image,
  const MagickFunction function,const ssize_t number_parameters,
  const double *parameters,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
function
A channel function.
parameters
one or more parameters.
exception
return any errors or warnings in this structure.

GetImageEntropy

GetImageEntropy() returns the entropy of one or more image channels.

The format of the GetImageEntropy method is:

MagickBooleanType GetImageEntropy(const Image *image,double *entropy,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
entropy
the average entropy of the selected channels.
exception
return any errors or warnings in this structure.

GetImageExtrema

GetImageExtrema() returns the extrema of one or more image channels.

The format of the GetImageExtrema method is:

MagickBooleanType GetImageExtrema(const Image *image,size_t *minima,
  size_t *maxima,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
minima
the minimum value in the channel.
maxima
the maximum value in the channel.
exception
return any errors or warnings in this structure.

GetImageKurtosis

GetImageKurtosis() returns the kurtosis and skewness of one or more image channels.

The format of the GetImageKurtosis method is:

MagickBooleanType GetImageKurtosis(const Image *image,double *kurtosis,
  double *skewness,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
kurtosis
the kurtosis of the channel.
skewness
the skewness of the channel.
exception
return any errors or warnings in this structure.

GetImageMean

GetImageMean() returns the mean and standard deviation of one or more image channels.

The format of the GetImageMean method is:

MagickBooleanType GetImageMean(const Image *image,double *mean,
  double *standard_deviation,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
mean
the average value in the channel.
standard_deviation
the standard deviation of the channel.
exception
return any errors or warnings in this structure.

GetImageMoments

GetImageMoments() returns the normalized moments of one or more image channels.

The format of the GetImageMoments method is:

ChannelMoments *GetImageMoments(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

GetImagePerceptualHash

GetImagePerceptualHash() returns the perceptual hash of one or more image channels.

The format of the GetImagePerceptualHash method is:

ChannelPerceptualHash *GetImagePerceptualHash(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

GetImageRange

GetImageRange() returns the range of one or more image channels.

The format of the GetImageRange method is:

MagickBooleanType GetImageRange(const Image *image,double *minima,
  double *maxima,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
minima
the minimum value in the channel.
maxima
the maximum value in the channel.
exception
return any errors or warnings in this structure.

GetImageStatistics

GetImageStatistics() returns statistics for each channel in the image. The statistics include the channel depth, its minima, maxima, mean, standard deviation, kurtosis and skewness. You can access the red channel mean, for example, like this:

channel_statistics=GetImageStatistics(image,exception);
red_mean=channel_statistics[RedPixelChannel].mean;

Use MagickRelinquishMemory() to free the statistics buffer.

The format of the GetImageStatistics method is:

ChannelStatistics *GetImageStatistics(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

PolynomialImage

PolynomialImage() returns a new image where each pixel is the sum of the pixels in the image sequence after applying its corresponding terms (coefficient and degree pairs).

The format of the PolynomialImage method is:

Image *PolynomialImage(const Image *images,const size_t number_terms,
  const double *terms,ExceptionInfo *exception)

A description of each parameter follows:

images
the image sequence.
number_terms
the number of terms in the list. The actual list length is 2 x number_terms + 1 (the constant).
terms
the list of polynomial coefficients and degree pairs and a constant.
exception
return any errors or warnings in this structure.

StatisticImage

StatisticImage() makes each pixel the min / max / median / mode / etc. of the neighborhood of the specified width and height.

The format of the StatisticImage method is:

Image *StatisticImage(const Image *image,const StatisticType type,
  const size_t width,const size_t height,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
type
the statistic type (median, mode, etc.).
width
the width of the pixel neighborhood.
height
the height of the pixel neighborhood.
exception
return any errors or warnings in this structure.
ImageMagick: MagickWand, C API for ImageMagick: Pixel Iterator Methods

ClearPixelIteratorClonePixelIteratorDestroyPixelIteratorIsPixelIteratorNewPixelIteratorPixelClearIteratorExceptionNewPixelRegionIteratorPixelGetCurrentIteratorRowPixelGetIteratorExceptionPixelGetIteratorExceptionTypePixelGetIteratorRowPixelGetNextIteratorRowPixelGetPreviousIteratorRowPixelResetIteratorPixelSetFirstIteratorRowPixelSetIteratorRowPixelSetLastIteratorRowPixelSyncIterator

ClearPixelIterator

ClearPixelIterator() clear resources associated with a PixelIterator.

The format of the ClearPixelIterator method is:

void ClearPixelIterator(PixelIterator *iterator)

A description of each parameter follows:

iterator
the pixel iterator.

ClonePixelIterator

ClonePixelIterator() makes an exact copy of the specified iterator.

The format of the ClonePixelIterator method is:

PixelIterator *ClonePixelIterator(const PixelIterator *iterator)

A description of each parameter follows:

iterator
the magick iterator.

DestroyPixelIterator

DestroyPixelIterator() deallocates resources associated with a PixelIterator.

The format of the DestroyPixelIterator method is:

PixelIterator *DestroyPixelIterator(PixelIterator *iterator)

A description of each parameter follows:

iterator
the pixel iterator.

IsPixelIterator

IsPixelIterator() returns MagickTrue if the iterator is verified as a pixel iterator.

The format of the IsPixelIterator method is:

MagickBooleanType IsPixelIterator(const PixelIterator *iterator)

A description of each parameter follows:

iterator
the magick iterator.

NewPixelIterator

NewPixelIterator() returns a new pixel iterator.

The format of the NewPixelIterator method is:

PixelIterator *NewPixelIterator(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

PixelClearIteratorException

PixelClearIteratorException() clear any exceptions associated with the iterator.

The format of the PixelClearIteratorException method is:

MagickBooleanType PixelClearIteratorException(PixelIterator *iterator)

A description of each parameter follows:

iterator
the pixel iterator.

NewPixelRegionIterator

NewPixelRegionIterator() returns a new pixel iterator.

The format of the NewPixelRegionIterator method is:

PixelIterator *NewPixelRegionIterator(MagickWand *wand,const ssize_t x,
  const ssize_t y,const size_t width,const size_t height)

A description of each parameter follows:

wand
the magick wand.
x,y,columns,rows
These values define the perimeter of a region of pixels.

PixelGetCurrentIteratorRow

PixelGetCurrentIteratorRow() returns the current row as an array of pixel wands from the pixel iterator.

The format of the PixelGetCurrentIteratorRow method is:

PixelWand **PixelGetCurrentIteratorRow(PixelIterator *iterator,
  size_t *number_wands)

A description of each parameter follows:

iterator
the pixel iterator.
number_wands
the number of pixel wands.

PixelGetIteratorException

PixelGetIteratorException() returns the severity, reason, and description of any error that occurs when using other methods in this API.

The format of the PixelGetIteratorException method is:

char *PixelGetIteratorException(const PixelIterator *iterator,
  ExceptionType *severity)

A description of each parameter follows:

iterator
the pixel iterator.
severity
the severity of the error is returned here.

PixelGetIteratorExceptionType

PixelGetIteratorExceptionType() the exception type associated with the iterator. If no exception has occurred, UndefinedExceptionType is returned.

The format of the PixelGetIteratorExceptionType method is:

ExceptionType PixelGetIteratorExceptionType(
  const PixelIterator *iterator)

A description of each parameter follows:

iterator
the pixel iterator.

PixelGetIteratorRow

PixelGetIteratorRow() returns the current pixel iterator row.

The format of the PixelGetIteratorRow method is:

MagickBooleanType PixelGetIteratorRow(PixelIterator *iterator)

A description of each parameter follows:

iterator
the pixel iterator.

PixelGetNextIteratorRow

PixelGetNextIteratorRow() returns the next row as an array of pixel wands from the pixel iterator.

The format of the PixelGetNextIteratorRow method is:

PixelWand **PixelGetNextIteratorRow(PixelIterator *iterator,
  size_t *number_wands)

A description of each parameter follows:

iterator
the pixel iterator.
number_wands
the number of pixel wands.

PixelGetPreviousIteratorRow

PixelGetPreviousIteratorRow() returns the previous row as an array of pixel wands from the pixel iterator.

The format of the PixelGetPreviousIteratorRow method is:

PixelWand **PixelGetPreviousIteratorRow(PixelIterator *iterator,
  size_t *number_wands)

A description of each parameter follows:

iterator
the pixel iterator.
number_wands
the number of pixel wands.

PixelResetIterator

PixelResetIterator() resets the pixel iterator. Use it in conjunction with PixelGetNextIteratorRow() to iterate over all the pixels in a pixel container.

The format of the PixelResetIterator method is:

void PixelResetIterator(PixelIterator *iterator)

A description of each parameter follows:

iterator
the pixel iterator.

PixelSetFirstIteratorRow

PixelSetFirstIteratorRow() sets the pixel iterator to the first pixel row.

The format of the PixelSetFirstIteratorRow method is:

void PixelSetFirstIteratorRow(PixelIterator *iterator)

A description of each parameter follows:

iterator
the magick iterator.

PixelSetIteratorRow

PixelSetIteratorRow() set the pixel iterator row.

The format of the PixelSetIteratorRow method is:

MagickBooleanType PixelSetIteratorRow(PixelIterator *iterator,
  const ssize_t row)

A description of each parameter follows:

iterator
the pixel iterator.

PixelSetLastIteratorRow

PixelSetLastIteratorRow() sets the pixel iterator to the last pixel row.

The format of the PixelSetLastIteratorRow method is:

void PixelSetLastIteratorRow(PixelIterator *iterator)

A description of each parameter follows:

iterator
the magick iterator.

PixelSyncIterator

PixelSyncIterator() syncs the pixel iterator.

The format of the PixelSyncIterator method is:

MagickBooleanType PixelSyncIterator(PixelIterator *iterator)

A description of each parameter follows:

iterator
the pixel iterator.
ImageMagick: MagickCore, C API for ImageMagick: Dealing with Exceptions

AcquireExceptionInfoClearMagickExceptionCatchExceptionCloneExceptionInfoDestroyExceptionInfoGetExceptionMessageGetLocaleExceptionMessageInheritExceptionInitializeExceptionInfoMagickErrorMagickFatalErrorMagickWarningSetErrorHandlerSetFatalErrorHandlerSetWarningHandlerThrowException

AcquireExceptionInfo

AcquireExceptionInfo() allocates the ExceptionInfo structure.

The format of the AcquireExceptionInfo method is:

ExceptionInfo *AcquireExceptionInfo(void)

ClearMagickException

ClearMagickException() clears any exception that may not have been caught yet.

The format of the ClearMagickException method is:

ClearMagickException(ExceptionInfo *exception)

A description of each parameter follows:

exception
the exception info.

CatchException

CatchException() returns if no exceptions is found otherwise it reports the exception as a warning, error, or fatal depending on the severity.

The format of the CatchException method is:

CatchException(ExceptionInfo *exception)

A description of each parameter follows:

exception
the exception info.

CloneExceptionInfo

CloneExceptionInfo() clones the ExceptionInfo structure.

The format of the CloneExceptionInfo method is:

ExceptionInfo *CloneException(ExceptionInfo *exception)

A description of each parameter follows:

exception
the exception info.

DestroyExceptionInfo

DestroyExceptionInfo() deallocates memory associated with an exception.

The format of the DestroyExceptionInfo method is:

ExceptionInfo *DestroyExceptionInfo(ExceptionInfo *exception)

A description of each parameter follows:

exception
the exception info.

GetExceptionMessage

GetExceptionMessage() returns the error message defined by the specified error code.

The format of the GetExceptionMessage method is:

char *GetExceptionMessage(const int error)

A description of each parameter follows:

error
the error code.

GetLocaleExceptionMessage

GetLocaleExceptionMessage() converts a enumerated exception severity and tag to a message in the current locale.

The format of the GetLocaleExceptionMessage method is:

const char *GetLocaleExceptionMessage(const ExceptionType severity,
  const char *tag)

A description of each parameter follows:

severity
the severity of the exception.
tag
the message tag.

InheritException

InheritException() inherits an exception from a related exception.

The format of the InheritException method is:

InheritException(ExceptionInfo *exception,const ExceptionInfo *relative)

A description of each parameter follows:

exception
the exception info.
relative
the related exception info.

InitializeExceptionInfo

InitializeExceptionInfo() initializes an exception to default values.

The format of the InitializeExceptionInfo method is:

InitializeExceptionInfo(ExceptionInfo *exception)

A description of each parameter follows:

exception
the exception info.

MagickError

MagickError() calls the exception handler methods with an error reason.

The format of the MagickError method is:

void MagickError(const ExceptionType error,const char *reason,
  const char *description)

A description of each parameter follows:

exception
Specifies the numeric error category.
reason
Specifies the reason to display before terminating the program.
description
Specifies any description to the reason.

MagickFatalError

MagickFatalError() calls the fatal exception handler methods with an error reason.

The format of the MagickError method is:

void MagickFatalError(const ExceptionType error,const char *reason,
  const char *description)

A description of each parameter follows:

exception
Specifies the numeric error category.
reason
Specifies the reason to display before terminating the program.
description
Specifies any description to the reason.

MagickWarning

MagickWarning() calls the warning handler methods with a warning reason.

The format of the MagickWarning method is:

void MagickWarning(const ExceptionType warning,const char *reason,
  const char *description)

A description of each parameter follows:

warning
the warning severity.
reason
Define the reason for the warning.
description
Describe the warning.

SetErrorHandler

SetErrorHandler() sets the exception handler to the specified method and returns the previous exception handler.

The format of the SetErrorHandler method is:

ErrorHandler SetErrorHandler(ErrorHandler handler)

A description of each parameter follows:

handler
the method to handle errors.

SetFatalErrorHandler

SetFatalErrorHandler() sets the fatal exception handler to the specified method and returns the previous fatal exception handler.

The format of the SetErrorHandler method is:

ErrorHandler SetErrorHandler(ErrorHandler handler)

A description of each parameter follows:

handler
the method to handle errors.

SetWarningHandler

SetWarningHandler() sets the warning handler to the specified method and returns the previous warning handler.

The format of the SetWarningHandler method is:

ErrorHandler SetWarningHandler(ErrorHandler handler)

A description of each parameter follows:

handler
the method to handle warnings.

ThrowException

ThrowException() throws an exception with the specified severity code, reason, and optional description.

The format of the ThrowException method is:

MagickBooleanType ThrowException(ExceptionInfo *exception,
  const ExceptionType severity,const char *reason,
  const char *description)

A description of each parameter follows:

exception
the exception info.
severity
the severity of the exception.
reason
the reason for the exception.
description
the exception description.
ImageMagick: MagickCore, C API for ImageMagick: Resize an Image

AdaptiveResizeImageInterpolativeResizeImageLiquidRescaleImageMagnifyImageMinifyImageResampleImageResizeImageSampleImageScaleImageThumbnailImage

AdaptiveResizeImage

AdaptiveResizeImage() adaptively resize image with pixel resampling.

This is shortcut function for a fast interpolative resize using mesh interpolation. It works well for small resizes of less than +/- 50 of the original image size. For larger resizing on images a full filtered and slower resize function should be used instead.

The format of the AdaptiveResizeImage method is:

Image *AdaptiveResizeImage(const Image *image,const size_t columns,
  const size_t rows,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
columns
the number of columns in the resized image.
rows
the number of rows in the resized image.
exception
return any errors or warnings in this structure.

InterpolativeResizeImage

InterpolativeResizeImage() resizes an image using the specified interpolation method.

The format of the InterpolativeResizeImage method is:

Image *InterpolativeResizeImage(const Image *image,const size_t columns,
  const size_t rows,const PixelInterpolateMethod method,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
columns
the number of columns in the resized image.
rows
the number of rows in the resized image.
method
the pixel interpolation method.
exception
return any errors or warnings in this structure.

LiquidRescaleImage

LiquidRescaleImage() rescales image with seam carving.

The format of the LiquidRescaleImage method is:

Image *LiquidRescaleImage(const Image *image,const size_t columns,
  const size_t rows,const double delta_x,const double rigidity,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
columns
the number of columns in the rescaled image.
rows
the number of rows in the rescaled image.
delta_x
maximum seam transversal step (0 means straight seams).
rigidity
introduce a bias for non-straight seams (typically 0).
exception
return any errors or warnings in this structure.

MagnifyImage

MagnifyImage() doubles the size of the image with a pixel art scaling algorithm.

The format of the MagnifyImage method is:

Image *MagnifyImage(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

MinifyImage

MinifyImage() is a convenience method that scales an image proportionally to half its size.

The format of the MinifyImage method is:

Image *MinifyImage(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

ResampleImage

ResampleImage() resize image in terms of its pixel size, so that when displayed at the given resolution it will be the same size in terms of real world units as the original image at the original resolution.

The format of the ResampleImage method is:

Image *ResampleImage(Image *image,const double x_resolution,
  const double y_resolution,const FilterTypes filter,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image to be resized to fit the given resolution.
x_resolution
the new image x resolution.
y_resolution
the new image y resolution.
filter
Image filter to use.
exception
return any errors or warnings in this structure.

ResizeImage

ResizeImage() scales an image to the desired dimensions, using the given filter (see AcquireFilterInfo()).

If an undefined filter is given the filter defaults to Mitchell for a colormapped image, a image with a matte channel, or if the image is enlarged. Otherwise the filter defaults to a Lanczos.

ResizeImage() was inspired by Paul Heckbert's "zoom" program.

The format of the ResizeImage method is:

Image *ResizeImage(Image *image,const size_t columns,const size_t rows,
  const FilterTypes filter,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.
filter
Image filter to use.
exception
return any errors or warnings in this structure.

SampleImage

SampleImage() scales an image to the desired dimensions with pixel sampling. Unlike other scaling methods, this method does not introduce any additional color into the scaled image.

The format of the SampleImage method is:

Image *SampleImage(const Image *image,const size_t columns,
  const size_t rows,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
columns
the number of columns in the sampled image.
rows
the number of rows in the sampled image.
exception
return any errors or warnings in this structure.

ScaleImage

ScaleImage() changes the size of an image to the given dimensions.

The format of the ScaleImage method is:

Image *ScaleImage(const Image *image,const size_t columns,
  const size_t rows,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.
exception
return any errors or warnings in this structure.

ThumbnailImage

ThumbnailImage() changes the size of an image to the given dimensions and removes any associated profiles. The goal is to produce small low cost thumbnail images suited for display on the Web.

The format of the ThumbnailImage method is:

Image *ThumbnailImage(const Image *image,const size_t columns,
  const size_t rows,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
columns
the number of columns in the scaled image.
rows
the number of rows in the scaled image.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Transform an Image

AutoOrientImageChopImageCropImageCropImageToTilesExcerptImageExtentImageFlipImageFlopImageRollImageShaveImageSpliceImageTransformImageTransformImagesTransposeImageTransverseImageTrimImage

AutoOrientImage

AutoOrientImage() adjusts an image so that its orientation is suitable for viewing (i.e. top-left orientation).

The format of the AutoOrientImage method is:

Image *AutoOrientImage(const Image *image,
  const OrientationType orientation,ExceptionInfo *exception)

A description of each parameter follows:

image
The image.
orientation
Current image orientation.
exception
Return any errors or warnings in this structure.

ChopImage

ChopImage() removes a region of an image and collapses the image to occupy the removed portion.

The format of the ChopImage method is:

Image *ChopImage(const Image *image,const RectangleInfo *chop_info)
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
chop_info
Define the region of the image to chop.
exception
return any errors or warnings in this structure.

CropImage

CropImage() extracts a region of the image starting at the offset defined by geometry. Region must be fully defined, and no special handling of geometry flags is performed.

The format of the CropImage method is:

Image *CropImage(const Image *image,const RectangleInfo *geometry,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
geometry
Define the region of the image to crop with members x, y, width, and height.
exception
return any errors or warnings in this structure.

CropImageToTiles

CropImageToTiles() crops a single image, into a possible list of tiles. This may include a single sub-region of the image. This basically applies all the normal geometry flags for Crop.

Image *CropImageToTiles(const Image *image, const RectangleInfo *crop_geometry, ExceptionInfo *exception)

A description of each parameter follows:

image
the image The transformed image is returned as this parameter.
crop_geometry
A crop geometry string.
exception
return any errors or warnings in this structure.

ExcerptImage

ExcerptImage() returns a excerpt of the image as defined by the geometry.

The format of the ExcerptImage method is:

Image *ExcerptImage(const Image *image,const RectangleInfo *geometry,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
geometry
Define the region of the image to extend with members x, y, width, and height.
exception
return any errors or warnings in this structure.

ExtentImage

ExtentImage() extends the image as defined by the geometry, gravity, and image background color. Set the (x,y) offset of the geometry to move the original image relative to the extended image.

The format of the ExtentImage method is:

Image *ExtentImage(const Image *image,const RectangleInfo *geometry,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
geometry
Define the region of the image to extend with members x, y, width, and height.
exception
return any errors or warnings in this structure.

FlipImage

FlipImage() creates a vertical mirror image by reflecting the pixels around the central x-axis.

The format of the FlipImage method is:

Image *FlipImage(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

FlopImage

FlopImage() creates a horizontal mirror image by reflecting the pixels around the central y-axis.

The format of the FlopImage method is:

Image *FlopImage(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

RollImage

RollImage() offsets an image as defined by x_offset and y_offset.

The format of the RollImage method is:

Image *RollImage(const Image *image,const ssize_t x_offset,
  const ssize_t y_offset,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
x_offset
the number of columns to roll in the horizontal direction.
y_offset
the number of rows to roll in the vertical direction.
exception
return any errors or warnings in this structure.

ShaveImage

ShaveImage() shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

The format of the ShaveImage method is:

Image *ShaveImage(const Image *image,const RectangleInfo *shave_info,
  ExceptionInfo *exception)

A description of each parameter follows:

shave_image
Method ShaveImage returns a pointer to the shaved image. A null image is returned if there is a memory shortage or if the image width or height is zero.
image
the image.
shave_info
Specifies a pointer to a RectangleInfo which defines the region of the image to crop.
exception
return any errors or warnings in this structure.

SpliceImage

SpliceImage() splices a solid color into the image as defined by the geometry.

The format of the SpliceImage method is:

Image *SpliceImage(const Image *image,const RectangleInfo *geometry,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
geometry
Define the region of the image to splice with members x, y, width, and height.
exception
return any errors or warnings in this structure.

TransformImage

TransformImage() is a convenience method that behaves like ResizeImage() or CropImage() but accepts scaling and/or cropping information as a region geometry specification. If the operation fails, the original image handle is left as is.

This should only be used for single images.

This function destroys what it assumes to be a single image list. If the input image is part of a larger list, all other images in that list will be simply 'lost', not destroyed.

Also if the crop generates a list of images only the first image is resized. And finally if the crop succeeds and the resize failed, you will get a cropped image, as well as a 'false' or 'failed' report.

This function and should probably be deprecated in favor of direct calls to CropImageToTiles() or ResizeImage(), as appropriate.

The format of the TransformImage method is:

MagickBooleanType TransformImage(Image **image,const char *crop_geometry,
  const char *image_geometry,ExceptionInfo *exception)

A description of each parameter follows:

image
the image The transformed image is returned as this parameter.
crop_geometry
A crop geometry string. This geometry defines a subregion of the image to crop.
image_geometry
An image geometry string. This geometry defines the final size of the image.
exception
return any errors or warnings in this structure.

TransformImages

TransformImages() calls TransformImage() on each image of a sequence.

The format of the TransformImage method is:

MagickBooleanType TransformImages(Image **image,
  const char *crop_geometry,const char *image_geometry,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image The transformed image is returned as this parameter.
crop_geometry
A crop geometry string. This geometry defines a subregion of the image to crop.
image_geometry
An image geometry string. This geometry defines the final size of the image.
exception
return any errors or warnings in this structure.

TransposeImage

TransposeImage() creates a horizontal mirror image by reflecting the pixels around the central y-axis while rotating them by 90 degrees.

The format of the TransposeImage method is:

Image *TransposeImage(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

TransverseImage

TransverseImage() creates a vertical mirror image by reflecting the pixels around the central x-axis while rotating them by 270 degrees.

The format of the TransverseImage method is:

Image *TransverseImage(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

TrimImage

TrimImage() trims pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

The format of the TrimImage method is:

Image *TrimImage(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Monitor the Progress of an Image Operation

SetImageProgressMonitorSetImageInfoProgressMonitor

SetImageProgressMonitor

SetImageProgressMonitor() sets the image progress monitor to the specified method and returns the previous progress monitor if any. The progress monitor method looks like this:

    MagickBooleanType MagickProgressMonitor(const char *text,
const MagickOffsetType offset,const MagickSizeType extent,
void *client_data)

If the progress monitor returns MagickFalse, the current operation is interrupted.

The format of the SetImageProgressMonitor method is:

MagickProgressMonitor SetImageProgressMonitor(Image *image,
  const MagickProgressMonitor progress_monitor,void *client_data)

A description of each parameter follows:

image
the image.
progress_monitor
Specifies a pointer to a method to monitor progress of an image operation.
client_data
Specifies a pointer to any client data.

SetImageInfoProgressMonitor

SetImageInfoProgressMonitor() sets the image_info progress monitor to the specified method and returns the previous progress monitor if any. The progress monitor method looks like this:

    MagickBooleanType MagickProgressMonitor(const char *text,
const MagickOffsetType offset,const MagickSizeType extent,
void *client_data)

If the progress monitor returns MagickFalse, the current operation is interrupted.

The format of the SetImageInfoProgressMonitor method is:

MagickProgressMonitor SetImageInfoProgressMonitor(ImageInfo *image_info,
  const MagickProgressMonitor progress_monitor,void *client_data)

A description of each parameter follows:

image_info
the image info.
progress_monitor
Specifies a pointer to a method to monitor progress of an image operation.
client_data
Specifies a pointer to any client data.
ImageMagick: MagickCore, C API for ImageMagick: Create an Image Thumbnail

CloneMontageInfoDestroyMontageInfoGetMontageInfoMontageImageList

CloneMontageInfo

CloneMontageInfo() makes a copy of the given montage info structure. If NULL is specified, a new image info structure is created initialized to default values.

The format of the CloneMontageInfo method is:

MontageInfo *CloneMontageInfo(const ImageInfo *image_info,
  const MontageInfo *montage_info)

A description of each parameter follows:

image_info
the image info.
montage_info
the montage info.

DestroyMontageInfo

DestroyMontageInfo() deallocates memory associated with montage_info.

The format of the DestroyMontageInfo method is:

MontageInfo *DestroyMontageInfo(MontageInfo *montage_info)

A description of each parameter follows:

montage_info
Specifies a pointer to an MontageInfo structure.

GetMontageInfo

GetMontageInfo() initializes montage_info to default values.

The format of the GetMontageInfo method is:

void GetMontageInfo(const ImageInfo *image_info,
  MontageInfo *montage_info)

A description of each parameter follows:

image_info
a structure of type ImageInfo.
montage_info
Specifies a pointer to a MontageInfo structure.

MontageImageList

MontageImageList() is a layout manager that lets you tile one or more thumbnails across an image canvas.

The format of the MontageImageList method is:

Image *MontageImageList(const ImageInfo *image_info,
  const MontageInfo *montage_info,Image *images,
  ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
montage_info
Specifies a pointer to a MontageInfo structure.
images
Specifies a pointer to an array of Image structures.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Compute a Message Digest for an Image

SignatureImage

SignatureImage

SignatureImage() computes a message digest from an image pixel stream with an implementation of the NIST SHA-256 Message Digest algorithm. This signature uniquely identifies the image and is convenient for determining if an image has been modified or whether two images are identical.

The format of the SignatureImage method is:

MagickBooleanType SignatureImage(Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.
ImageMagick: MagickWand, C API for ImageMagick: Wand Methods

ClearMagickWandCloneMagickWandDestroyMagickWandIsMagickWandMagickClearExceptionMagickGetExceptionMagickGetExceptionTypeMagickGetIteratorIndexMagickQueryConfigureOptionMagickQueryConfigureOptionsMagickQueryFontMetricsMagickQueryMultilineFontMetricsMagickQueryFontsMagickQueryFormatsMagickRelinquishMemoryMagickResetIteratorMagickSetFirstIteratorMagickSetIteratorIndexMagickSetLastIteratorMagickWandGenesisMagickWandTerminusNewMagickWandNewMagickWandFromImageIsMagickWandInstantiated

ClearMagickWand

ClearMagickWand() clears resources associated with the wand, leaving the wand blank, and ready to be used for a new set of images.

The format of the ClearMagickWand method is:

void ClearMagickWand(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

CloneMagickWand

CloneMagickWand() makes an exact copy of the specified wand.

The format of the CloneMagickWand method is:

MagickWand *CloneMagickWand(const MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

DestroyMagickWand

DestroyMagickWand() deallocates memory associated with an MagickWand.

The format of the DestroyMagickWand method is:

MagickWand *DestroyMagickWand(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

IsMagickWand

IsMagickWand() returns MagickTrue if the wand is verified as a magick wand.

The format of the IsMagickWand method is:

MagickBooleanType IsMagickWand(const MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickClearException

MagickClearException() clears any exceptions associated with the wand.

The format of the MagickClearException method is:

MagickBooleanType MagickClearException(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetException

MagickGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.

The format of the MagickGetException method is:

char *MagickGetException(const MagickWand *wand,ExceptionType *severity)

A description of each parameter follows:

wand
the magick wand.
severity
the severity of the error is returned here.

MagickGetExceptionType

MagickGetExceptionType() returns the exception type associated with the wand. If no exception has occurred, UndefinedExceptionType is returned.

The format of the MagickGetExceptionType method is:

ExceptionType MagickGetExceptionType(const MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickGetIteratorIndex

MagickGetIteratorIndex() returns the position of the iterator in the image list.

The format of the MagickGetIteratorIndex method is:

ssize_t MagickGetIteratorIndex(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickQueryConfigureOption

MagickQueryConfigureOption() returns the value associated with the specified configure option.

The format of the MagickQueryConfigureOption function is:

char *MagickQueryConfigureOption(const char *option)

A description of each parameter follows:

option
the option name.

MagickQueryConfigureOptions

MagickQueryConfigureOptions() returns any configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc.

The format of the MagickQueryConfigureOptions function is:

char **MagickQueryConfigureOptions(const char *pattern,
  size_t *number_options)

A description of each parameter follows:

pattern
Specifies a pointer to a text string containing a pattern.
number_options
Returns the number of configure options in the list.

MagickQueryFontMetrics

MagickQueryFontMetrics() returns a 13 element array representing the following font metrics:

    Element Description
    -------------------------------------------------
    0 character width
    1 character height
    2 ascender
    3 descender
    4 text width
    5 text height
    6 maximum horizontal advance
    7 bounding box: x1
    8 bounding box: y1
    9 bounding box: x2
   10 bounding box: y2
   11 origin: x
   12 origin: y

The format of the MagickQueryFontMetrics method is:

double *MagickQueryFontMetrics(MagickWand *wand,
  const DrawingWand *drawing_wand,const char *text)

A description of each parameter follows:

wand
the Magick wand.
drawing_wand
the drawing wand.
text
the text.

MagickQueryMultilineFontMetrics

MagickQueryMultilineFontMetrics() returns a 13 element array representing the following font metrics:

    Element Description
    -------------------------------------------------
    0 character width
    1 character height
    2 ascender
    3 descender
    4 text width
    5 text height
    6 maximum horizontal advance
    7 bounding box: x1
    8 bounding box: y1
    9 bounding box: x2
   10 bounding box: y2
   11 origin: x
   12 origin: y

This method is like MagickQueryFontMetrics() but it returns the maximum text width and height for multiple lines of text.

The format of the MagickQueryFontMetrics method is:

double *MagickQueryMultilineFontMetrics(MagickWand *wand,
  const DrawingWand *drawing_wand,const char *text)

A description of each parameter follows:

wand
the Magick wand.
drawing_wand
the drawing wand.
text
the text.

MagickQueryFonts

MagickQueryFonts() returns any font that match the specified pattern (e.g. "*" for all).

The format of the MagickQueryFonts function is:

char **MagickQueryFonts(const char *pattern,size_t *number_fonts)

A description of each parameter follows:

pattern
Specifies a pointer to a text string containing a pattern.
number_fonts
Returns the number of fonts in the list.

MagickQueryFormats

MagickQueryFormats() returns any image formats that match the specified pattern (e.g. "*" for all).

The format of the MagickQueryFormats function is:

char **MagickQueryFormats(const char *pattern,size_t *number_formats)

A description of each parameter follows:

pattern
Specifies a pointer to a text string containing a pattern.
number_formats
This integer returns the number of image formats in the list.

MagickRelinquishMemory

MagickRelinquishMemory() relinquishes memory resources returned by such methods as MagickIdentifyImage(), MagickGetException(), etc.

The format of the MagickRelinquishMemory method is:

void *MagickRelinquishMemory(void *resource)

A description of each parameter follows:

resource
Relinquish the memory associated with this resource.

MagickResetIterator

MagickResetIterator() resets the wand iterator.

It is typically used either before iterating though images, or before calling specific functions such as MagickAppendImages() to append all images together.

Afterward you can use MagickNextImage() to iterate over all the images in a wand container, starting with the first image.

Using this before MagickAddImages() or MagickReadImages() will cause new images to be inserted between the first and second image.

The format of the MagickResetIterator method is:

void MagickResetIterator(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickSetFirstIterator

MagickSetFirstIterator() sets the wand iterator to the first image.

After using any images added to the wand using MagickAddImage() or MagickReadImage() will be prepended before any image in the wand.

Also the current image has been set to the first image (if any) in the Magick Wand. Using MagickNextImage() will then set teh current image to the second image in the list (if present).

This operation is similar to MagickResetIterator() but differs in how MagickAddImage(), MagickReadImage(), and MagickNextImage() behaves afterward.

The format of the MagickSetFirstIterator method is:

void MagickSetFirstIterator(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickSetIteratorIndex

MagickSetIteratorIndex() set the iterator to the given position in the image list specified with the index parameter. A zero index will set the first image as current, and so on. Negative indexes can be used to specify an image relative to the end of the images in the wand, with -1 being the last image in the wand.

If the index is invalid (range too large for number of images in wand) the function will return MagickFalse, but no 'exception' will be raised, as it is not actually an error. In that case the current image will not change.

After using any images added to the wand using MagickAddImage() or MagickReadImage() will be added after the image indexed, regardless of if a zero (first image in list) or negative index (from end) is used.

Jumping to index 0 is similar to MagickResetIterator() but differs in how MagickNextImage() behaves afterward.

The format of the MagickSetIteratorIndex method is:

MagickBooleanType MagickSetIteratorIndex(MagickWand *wand,
  const ssize_t index)

A description of each parameter follows:

wand
the magick wand.
index
the scene number.

MagickSetLastIterator

MagickSetLastIterator() sets the wand iterator to the last image.

The last image is actually the current image, and the next use of MagickPreviousImage() will not change this allowing this function to be used to iterate over the images in the reverse direction. In this sense it is more like MagickResetIterator() than MagickSetFirstIterator().

Typically this function is used before MagickAddImage(), MagickReadImage() functions to ensure new images are appended to the very end of wand's image list.

The format of the MagickSetLastIterator method is:

void MagickSetLastIterator(MagickWand *wand)

A description of each parameter follows:

wand
the magick wand.

MagickWandGenesis

MagickWandGenesis() initializes the MagickWand environment.

The format of the MagickWandGenesis method is:

void MagickWandGenesis(void)

MagickWandTerminus

MagickWandTerminus() terminates the MagickWand environment.

The format of the MaickWandTerminus method is:

void MagickWandTerminus(void)

NewMagickWand

NewMagickWand() returns a wand required for all other methods in the API. A fatal exception is thrown if there is not enough memory to allocate the wand. Use DestroyMagickWand() to dispose of the wand when it is no longer needed.

The format of the NewMagickWand method is:

MagickWand *NewMagickWand(void)

NewMagickWandFromImage

NewMagickWandFromImage() returns a wand with an image.

The format of the NewMagickWandFromImage method is:

MagickWand *NewMagickWandFromImage(const Image *image)

A description of each parameter follows:

image
the image.

IsMagickWandInstantiated

IsMagickWandInstantiated() returns MagickTrue if the ImageMagick environment is currently instantiated-- that is, MagickWandGenesis() has been called but MagickWandTerminus() has not.

The format of the IsMagickWandInstantiated method is:

MagickBooleanType IsMagickWandInstantiated(void)
ImageMagick: MagickCore, C API for ImageMagick: Add an Effect

AdaptiveBlurImageAdaptiveSharpenImageBlurImageConvolveImageDespeckleImageEdgeImageEmbossImageGaussianBlurImageKuwaharaImageMotionBlurImagePreviewImageRotationalBlurImageSelectiveBlurImageShadeImageSharpenImageSpreadImageUnsharpMaskImage

AdaptiveBlurImage

AdaptiveBlurImage() adaptively blurs the image by blurring less intensely near image edges and more intensely far from edges. We blur the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and AdaptiveBlurImage() selects a suitable radius for you.

The format of the AdaptiveBlurImage method is:

Image *AdaptiveBlurImage(const Image *image,const double radius,
  const double sigma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Laplacian, in pixels.
exception
return any errors or warnings in this structure.

AdaptiveSharpenImage

AdaptiveSharpenImage() adaptively sharpens the image by sharpening more intensely near image edges and less intensely far from edges. We sharpen the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and AdaptiveSharpenImage() selects a suitable radius for you.

The format of the AdaptiveSharpenImage method is:

Image *AdaptiveSharpenImage(const Image *image,const double radius,
  const double sigma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Laplacian, in pixels.
exception
return any errors or warnings in this structure.

BlurImage

BlurImage() blurs an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and BlurImage() selects a suitable radius for you.

The format of the BlurImage method is:

Image *BlurImage(const Image *image,const double radius,
  const double sigma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.
exception
return any errors or warnings in this structure.

ConvolveImage

ConvolveImage() applies a custom convolution kernel to the image.

The format of the ConvolveImage method is:

Image *ConvolveImage(const Image *image,const KernelInfo *kernel,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
kernel
the filtering kernel.
exception
return any errors or warnings in this structure.

DespeckleImage

DespeckleImage() reduces the speckle noise in an image while perserving the edges of the original image. A speckle removing filter uses a complementary hulling technique (raising pixels that are darker than their surrounding neighbors, then complementarily lowering pixels that are brighter than their surrounding neighbors) to reduce the speckle index of that image (reference Crimmins speckle removal).

The format of the DespeckleImage method is:

Image *DespeckleImage(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

EdgeImage

EdgeImage() finds edges in an image. Radius defines the radius of the convolution filter. Use a radius of 0 and EdgeImage() selects a suitable radius for you.

The format of the EdgeImage method is:

Image *EdgeImage(const Image *image,const double radius,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the pixel neighborhood.
exception
return any errors or warnings in this structure.

EmbossImage

EmbossImage() returns a grayscale image with a three-dimensional effect. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and Emboss() selects a suitable radius for you.

The format of the EmbossImage method is:

Image *EmbossImage(const Image *image,const double radius,
  const double sigma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the pixel neighborhood.
sigma
the standard deviation of the Gaussian, in pixels.
exception
return any errors or warnings in this structure.

GaussianBlurImage

GaussianBlurImage() blurs an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, the radius should be larger than sigma. Use a radius of 0 and GaussianBlurImage() selects a suitable radius for you

The format of the GaussianBlurImage method is:

Image *GaussianBlurImage(const Image *image,onst double radius,
  const double sigma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.
exception
return any errors or warnings in this structure.

KuwaharaImage

KuwaharaImage() is an edge preserving noise reduction filter.

The format of the KuwaharaImage method is:

Image *KuwaharaImage(const Image *image,const double radius,
  const double sigma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the square window radius.
sigma
the standard deviation of the Gaussian, in pixels.
exception
return any errors or warnings in this structure.

MotionBlurImage

MotionBlurImage() simulates motion blur. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and MotionBlurImage() selects a suitable radius for you. Angle gives the angle of the blurring motion.

Andrew Protano contributed this effect.

The format of the MotionBlurImage method is:

    Image *MotionBlurImage(const Image *image,const double radius,
const double sigma,const double angle,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.
angle
Apply the effect along this angle.
exception
return any errors or warnings in this structure.

PreviewImage

PreviewImage() tiles 9 thumbnails of the specified image with an image processing operation applied with varying parameters. This may be helpful pin-pointing an appropriate parameter for a particular image processing operation.

The format of the PreviewImages method is:

Image *PreviewImages(const Image *image,const PreviewType preview,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
preview
the image processing operation.
exception
return any errors or warnings in this structure.

RotationalBlurImage

RotationalBlurImage() applies a radial blur to the image.

Andrew Protano contributed this effect.

The format of the RotationalBlurImage method is:

    Image *RotationalBlurImage(const Image *image,const double angle,
ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
angle
the angle of the radial blur.
blur
the blur.
exception
return any errors or warnings in this structure.

SelectiveBlurImage

SelectiveBlurImage() selectively blur pixels within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.

The format of the SelectiveBlurImage method is:

Image *SelectiveBlurImage(const Image *image,const double radius,
  const double sigma,const double threshold,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.
threshold
only pixels within this contrast threshold are included in the blur operation.
exception
return any errors or warnings in this structure.

ShadeImage

ShadeImage() shines a distant light on an image to create a three-dimensional effect. You control the positioning of the light with azimuth and elevation; azimuth is measured in degrees off the x axis and elevation is measured in pixels above the Z axis.

The format of the ShadeImage method is:

Image *ShadeImage(const Image *image,const MagickBooleanType gray,
  const double azimuth,const double elevation,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
gray
A value other than zero shades the intensity of each pixel.
azimuth, elevation
Define the light source direction.
exception
return any errors or warnings in this structure.

SharpenImage

SharpenImage() sharpens the image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and SharpenImage() selects a suitable radius for you.

Using a separable kernel would be faster, but the negative weights cancel out on the corners of the kernel producing often undesirable ringing in the filtered result; this can be avoided by using a 2D gaussian shaped image sharpening kernel instead.

The format of the SharpenImage method is:

    Image *SharpenImage(const Image *image,const double radius,
const double sigma,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Laplacian, in pixels.
exception
return any errors or warnings in this structure.

SpreadImage

SpreadImage() is a special effects method that randomly displaces each pixel in a square area defined by the radius parameter.

The format of the SpreadImage method is:

Image *SpreadImage(const Image *image,
  const PixelInterpolateMethod method,const double radius,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
method
intepolation method.
radius
choose a random pixel in a neighborhood of this extent.
exception
return any errors or warnings in this structure.

UnsharpMaskImage

UnsharpMaskImage() sharpens one or more image channels. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and UnsharpMaskImage() selects a suitable radius for you.

The format of the UnsharpMaskImage method is:

    Image *UnsharpMaskImage(const Image *image,const double radius,
const double sigma,const double amount,const double threshold,
ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
radius
the radius of the Gaussian, in pixels, not counting the center pixel.
sigma
the standard deviation of the Gaussian, in pixels.
gain
the percentage of the difference between the original and the blur image that is added back into the original.
threshold
the threshold in pixels needed to apply the diffence gain.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Compare an Image to a Reconstructed Image

CompareImagesGetImageDistortionGetImageDistortionsIsImagesEqualSimilarityImage

CompareImages

CompareImages() compares one or more pixel channels of an image to a reconstructed image and returns the difference image.

The format of the CompareImages method is:

Image *CompareImages(const Image *image,const Image *reconstruct_image,
  const MetricType metric,double *distortion,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
reconstruct_image
the reconstruct image.
metric
the metric.
distortion
the computed distortion between the images.
exception
return any errors or warnings in this structure.

GetImageDistortion

GetImageDistortion() compares one or more pixel channels of an image to a reconstructed image and returns the specified distortion metric.

The format of the GetImageDistortion method is:

MagickBooleanType GetImageDistortion(const Image *image,
  const Image *reconstruct_image,const MetricType metric,
  double *distortion,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
reconstruct_image
the reconstruct image.
metric
the metric.
distortion
the computed distortion between the images.
exception
return any errors or warnings in this structure.

GetImageDistortions

GetImageDistortions() compares the pixel channels of an image to a reconstructed image and returns the specified distortion metric for each channel.

The format of the GetImageDistortions method is:

double *GetImageDistortions(const Image *image,
  const Image *reconstruct_image,const MetricType metric,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
reconstruct_image
the reconstruct image.
metric
the metric.
exception
return any errors or warnings in this structure.

IsImagesEqual

IsImagesEqual() measures the difference between colors at each pixel location of two images. A value other than 0 means the colors match exactly. Otherwise an error measure is computed by summing over all pixels in an image the distance squared in RGB space between each image pixel and its corresponding pixel in the reconstruct image. The error measure is assigned to these image members:

    o mean_error_per_pixel:  The mean error for any single pixel in
the image.
normalized_mean_error

The normalized mean quantization error for any single pixel in the image. This distance measure is normalized to a range between 0 and 1. It is independent of the range of red, green, and blue values in the image.

normalized_maximum_error

The normalized maximum quantization error for any single pixel in the image. This distance measure is normalized to a range between 0 and 1. It is independent of the range of red, green, and blue values in your image.

A small normalized mean square error, accessed as image->normalized_mean_error, suggests the images are very similar in spatial layout and color.

The format of the IsImagesEqual method is:

MagickBooleanType IsImagesEqual(Image *image,
  const Image *reconstruct_image,ExceptionInfo *exception)

A description of each parameter follows.

image

the image.

reconstruct_image

the reconstruct image.

exception

return any errors or warnings in this structure.

SimilarityImage

SimilarityImage() compares the reference image of the image and returns the best match offset. In addition, it returns a similarity image such that an exact match location is completely white and if none of the pixels match, black, otherwise some gray level in-between.

The format of the SimilarityImageImage method is:

Image *SimilarityImage(const Image *image,const Image *reference,
  const MetricType metric,const double similarity_threshold,
  RectangleInfo *offset,double *similarity,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
reference
find an area of the image that closely resembles this image.
metric
the metric.
similarity_threshold
minimum distortion for (sub)image match.
offset
the best match offset of the reference image within the image.
similarity
the computed similarity between the images.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Read or List Image formats

ImageMagick: MagickCore, C API for ImageMagick: Annotate an Image

AnnotateImageFormatMagickCaptionGetMultilineTypeMetricsGetTypeMetrics

AnnotateImage

AnnotateImage() annotates an image with text. Optionally you can include any of the following bits of information about the image by embedding the appropriate special characters:

    \n   newline
    \r   carriage return
    <    less-than character.
    >    greater-than character.
    &    ampersand character.
 a percent sign
    b   file size of image read in
    c   comment meta-data property
    d   directory component of path
    e   filename extension or suffix
    f   filename (including suffix)
    g   layer canvas page geometry   (equivalent to "WxHXY")
    h   current image height in pixels
    i   image filename (note: becomes output filename for "info:")
    k   CALCULATED: number of unique colors
    l   label meta-data property
    m   image file format (file magic)
    n   number of images in current image sequence
    o   output filename  (used for delegates)
    p   index of image in current image list
    q   quantum depth (compile-time constant)
    r   image class and colorspace
    s   scene number (from input unless re-assigned)
    t   filename without directory or extension (suffix)
    u   unique temporary filename (used for delegates)
    w   current width in pixels
    x   x resolution (density)
    y   y resolution (density)
    z   image depth (as read in unless modified, image save depth)
    A   image transparency channel enabled (true/false)
    C   image compression type
    D   image GIF dispose method
    G   original image size (wxh; before any resizes)
    H   page (canvas) height
    M   Magick filename (original file exactly as given,  including read mods)
    O   page (canvas) offset ( = XY )
    P   page (canvas) size ( = WxH )
    Q   image compression quality ( 0 = default )
    S   ?? scenes ??
    T   image time delay (in centi-seconds)
    U   image resolution units
    W   page (canvas) width
    X   page (canvas) x offset (including sign)
    Y   page (canvas) y offset (including sign)
    Z   unique filename (used for delegates)
    @   CALCULATED: trim bounding box (without actually trimming)
    #   CALCULATED: 'signature' hash of image values

The format of the AnnotateImage method is:

MagickBooleanType AnnotateImage(Image *image,DrawInfo *draw_info,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
exception
return any errors or warnings in this structure.

FormatMagickCaption

FormatMagickCaption() formats a caption so that it fits within the image width. It returns the number of lines in the formatted caption.

The format of the FormatMagickCaption method is:

ssize_t FormatMagickCaption(Image *image,DrawInfo *draw_info,
  const MagickBooleanType split,TypeMetric *metrics,char **caption,
  ExceptionInfo *exception)

A description of each parameter follows.

image

The image.

draw_info

the draw info.

split

when no convenient line breaks-- insert newline.

metrics

Return the font metrics in this structure.

caption

the caption.

exception

return any errors or warnings in this structure.

GetMultilineTypeMetrics

GetMultilineTypeMetrics() returns the following information for the specified font and text:

    character width
    character height
    ascender
    descender
    text width
    text height
    maximum horizontal advance
    bounds: x1
    bounds: y1
    bounds: x2
    bounds: y2
    origin: x
    origin: y
    underline position
    underline thickness

This method is like GetTypeMetrics() but it returns the maximum text width and height for multiple lines of text.

The format of the GetMultilineTypeMetrics method is:

MagickBooleanType GetMultilineTypeMetrics(Image *image,
  const DrawInfo *draw_info,TypeMetric *metrics,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
metrics
Return the font metrics in this structure.
exception
return any errors or warnings in this structure.

GetTypeMetrics

GetTypeMetrics() returns the following information for the specified font and text:

    character width
    character height
    ascender
    descender
    text width
    text height
    maximum horizontal advance
    bounds: x1
    bounds: y1
    bounds: x2
    bounds: y2
    origin: x
    origin: y
    underline position
    underline thickness

The format of the GetTypeMetrics method is:

MagickBooleanType GetTypeMetrics(Image *image,const DrawInfo *draw_info,
  TypeMetric *metrics,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
metrics
Return the font metrics in this structure.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Get or Set Image Channels

ChannelFxImageCombineImagesGetImageAlphaChannelSeparateImageSeparateImagesSetImageAlphaChannel

ChannelFxImage

ChannelFxImage() applies a channel expression to the specified image. The expression consists of one or more channels, either mnemonic or numeric (e.g. red, 1), separated by actions as follows:

<=> exchange two channels (e.g. red<=>blue) => copy one channel to another channel (e.g. red=>green) = assign a constant value to a channel (e.g. red=50) , write new image channels in the specified order (e.g. red, green) | add a new output image for the next set of channel operations ; move to the next input image for the source of channel data
For example, to create 3 grayscale images from the red, green, and blue channels of an image, use:
    -channel-fx "red; green; blue"

A channel without an operation symbol implies separate (i.e, semicolon).

The format of the ChannelFxImage method is:
Image *ChannelFxImage(const Image *image,const char *expression,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
expression
A channel expression.
exception
return any errors or warnings in this structure.

CombineImages

CombineImages() combines one or more images into a single image. The grayscale value of the pixels of each image in the sequence is assigned in order to the specified channels of the combined image. The typical ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc.

The format of the CombineImages method is:

Image *CombineImages(const Image *images,const ColorspaceType colorspace,
  ExceptionInfo *exception)

A description of each parameter follows:

images
the image sequence.
colorspace
the image colorspace.
exception
return any errors or warnings in this structure.

GetImageAlphaChannel

GetImageAlphaChannel() returns MagickFalse if the image alpha channel is not activated. That is, the image is RGB rather than RGBA or CMYK rather than CMYKA.

The format of the GetImageAlphaChannel method is:

MagickBooleanType GetImageAlphaChannel(const Image *image)

A description of each parameter follows:

image
the image.

SeparateImage

SeparateImage() separates a channel from the image and returns it as a grayscale image.

The format of the SeparateImage method is:

Image *SeparateImage(const Image *image,const ChannelType channel,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
channel
the image channel.
exception
return any errors or warnings in this structure.

SeparateImages

SeparateImages() returns a separate grayscale image for each channel specified.

The format of the SeparateImages method is:

Image *SeparateImages(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

SetImageAlphaChannel

SetImageAlphaChannel() activates, deactivates, resets, or sets the alpha channel.

The format of the SetImageAlphaChannel method is:

MagickBooleanType SetImageAlphaChannel(Image *image,
  const AlphaChannelOption alpha_type,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
alpha_type
The alpha channel type: ActivateAlphaChannel, AssociateAlphaChannel, CopyAlphaChannel, DeactivateAlphaChannel, DisassociateAlphaChannel, ExtractAlphaChannel, OffAlphaChannel, OnAlphaChannel, OpaqueAlphaChannel, SetAlphaChannel, ShapeAlphaChannel, and TransparentAlphaChannel.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Interactively Animate an Image Sequence

AnimateImages

AnimateImages

AnimateImages() repeatedly displays an image sequence to any X window screen. It returns a value other than 0 if successful. Check the exception member of image to determine the reason for any failure.

The format of the AnimateImages method is:

MagickBooleanType AnimateImages(const ImageInfo *image_info,
  Image *images,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
image
the image.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Annotate an Image

AnnotateImageFormatMagickCaptionGetMultilineTypeMetricsGetTypeMetrics

AnnotateImage

AnnotateImage() annotates an image with text. Optionally you can include any of the following bits of information about the image by embedding the appropriate special characters:

    \n   newline
    \r   carriage return
    <    less-than character.
    >    greater-than character.
    &    ampersand character.
 a percent sign
    b   file size of image read in
    c   comment meta-data property
    d   directory component of path
    e   filename extension or suffix
    f   filename (including suffix)
    g   layer canvas page geometry   (equivalent to "WxHXY")
    h   current image height in pixels
    i   image filename (note: becomes output filename for "info:")
    k   CALCULATED: number of unique colors
    l   label meta-data property
    m   image file format (file magic)
    n   number of images in current image sequence
    o   output filename  (used for delegates)
    p   index of image in current image list
    q   quantum depth (compile-time constant)
    r   image class and colorspace
    s   scene number (from input unless re-assigned)
    t   filename without directory or extension (suffix)
    u   unique temporary filename (used for delegates)
    w   current width in pixels
    x   x resolution (density)
    y   y resolution (density)
    z   image depth (as read in unless modified, image save depth)
    A   image transparency channel enabled (true/false)
    C   image compression type
    D   image GIF dispose method
    G   original image size (wxh; before any resizes)
    H   page (canvas) height
    M   Magick filename (original file exactly as given,  including read mods)
    O   page (canvas) offset ( = XY )
    P   page (canvas) size ( = WxH )
    Q   image compression quality ( 0 = default )
    S   ?? scenes ??
    T   image time delay (in centi-seconds)
    U   image resolution units
    W   page (canvas) width
    X   page (canvas) x offset (including sign)
    Y   page (canvas) y offset (including sign)
    Z   unique filename (used for delegates)
    @   CALCULATED: trim bounding box (without actually trimming)
    #   CALCULATED: 'signature' hash of image values

The format of the AnnotateImage method is:

MagickBooleanType AnnotateImage(Image *image,DrawInfo *draw_info,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
exception
return any errors or warnings in this structure.

FormatMagickCaption

FormatMagickCaption() formats a caption so that it fits within the image width. It returns the number of lines in the formatted caption.

The format of the FormatMagickCaption method is:

ssize_t FormatMagickCaption(Image *image,DrawInfo *draw_info,
  const MagickBooleanType split,TypeMetric *metrics,char **caption,
  ExceptionInfo *exception)

A description of each parameter follows.

image

The image.

draw_info

the draw info.

split

when no convenient line breaks-- insert newline.

metrics

Return the font metrics in this structure.

caption

the caption.

exception

return any errors or warnings in this structure.

GetMultilineTypeMetrics

GetMultilineTypeMetrics() returns the following information for the specified font and text:

    character width
    character height
    ascender
    descender
    text width
    text height
    maximum horizontal advance
    bounds: x1
    bounds: y1
    bounds: x2
    bounds: y2
    origin: x
    origin: y
    underline position
    underline thickness

This method is like GetTypeMetrics() but it returns the maximum text width and height for multiple lines of text.

The format of the GetMultilineTypeMetrics method is:

MagickBooleanType GetMultilineTypeMetrics(Image *image,
  const DrawInfo *draw_info,TypeMetric *metrics,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
metrics
Return the font metrics in this structure.
exception
return any errors or warnings in this structure.

GetTypeMetrics

GetTypeMetrics() returns the following information for the specified font and text:

    character width
    character height
    ascender
    descender
    text width
    text height
    maximum horizontal advance
    bounds: x1
    bounds: y1
    bounds: x2
    bounds: y2
    origin: x
    origin: y
    underline position
    underline thickness

The format of the GetTypeMetrics method is:

MagickBooleanType GetTypeMetrics(Image *image,const DrawInfo *draw_info,
  TypeMetric *metrics,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
draw_info
the draw info.
metrics
Return the font metrics in this structure.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Set Text Attributes

GetImageDepthGetImageQuantumDepthGetImageTypeIdentifyImageGrayIdentifyImageMonochromeIdentifyImageTypeIsImageGrayIsImageMonochromeIsImageOpaqueSetImageDepthSetImageType

GetImageDepth

GetImageDepth() returns the depth of a particular image channel.

The format of the GetImageDepth method is:

size_t GetImageDepth(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

GetImageQuantumDepth

GetImageQuantumDepth() returns the depth of the image rounded to a legal quantum depth: 8, 16, or 32.

The format of the GetImageQuantumDepth method is:

size_t GetImageQuantumDepth(const Image *image,
  const MagickBooleanType constrain)

A description of each parameter follows:

image
the image.
constrain
A value other than MagickFalse, constrains the depth to a maximum of MAGICKCORE_QUANTUM_DEPTH.

GetImageType

GetImageType() returns the type of image:

Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte

The format of the GetImageType method is:

ImageType GetImageType(const Image *image)

A description of each parameter follows:

image
the image.

IdentifyImageGray

IdentifyImageGray() returns grayscale if all the pixels in the image have the same red, green, and blue intensities, and bi-level is the intensity is either 0 or QuantumRange. Otherwise undefined is returned.

The format of the IdentifyImageGray method is:

ImageType IdentifyImageGray(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

IdentifyImageMonochrome

IdentifyImageMonochrome() returns MagickTrue if all the pixels in the image have the same red, green, and blue intensities and the intensity is either 0 or QuantumRange.

The format of the IdentifyImageMonochrome method is:

MagickBooleanType IdentifyImageMonochrome(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

IdentifyImageType

IdentifyImageType() returns the potential type of image:

Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte

To ensure the image type matches its potential, use SetImageType():

    (void) SetImageType(image,IdentifyImageType(image,exception),exception);

The format of the IdentifyImageType method is:

ImageType IdentifyImageType(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

IsImageGray

IsImageGray() returns MagickTrue if the type of the image is grayscale or bi-level.

The format of the IsImageGray method is:

MagickBooleanType IsImageGray(const Image *image)

A description of each parameter follows:

image
the image.

IsImageMonochrome

IsImageMonochrome() returns MagickTrue if type of the image is bi-level.

The format of the IsImageMonochrome method is:

MagickBooleanType IsImageMonochrome(const Image *image)

A description of each parameter follows:

image
the image.

IsImageOpaque

IsImageOpaque() returns MagickTrue if none of the pixels in the image have an alpha value other than OpaqueAlpha (QuantumRange).

Will return true immediatally is alpha channel is not available.

The format of the IsImageOpaque method is:

MagickBooleanType IsImageOpaque(const Image *image,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

SetImageDepth

SetImageDepth() sets the depth of the image.

The format of the SetImageDepth method is:

MagickBooleanType SetImageDepth(Image *image,const size_t depth,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
channel
the channel.
depth
the image depth.
exception
return any errors or warnings in this structure.

SetImageType

SetImageType() sets the type of image. Choose from these types:

Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte OptimizeType

The format of the SetImageType method is:

MagickBooleanType SetImageType(Image *image,const ImageType type,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
type
Image type.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Read or Write Binary Large OBjects

BlobToImageFileToImageGetBlobPropertiesImageToBlobImageToFileImagesToBlobInjectImageBlob

BlobToImage

BlobToImage() implements direct to memory image formats. It returns the blob as an image.

The format of the BlobToImage method is:

Image *BlobToImage(const ImageInfo *image_info,const void *blob,
  const size_t length,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
blob
the address of a character stream in one of the image formats understood by ImageMagick.
length
This size_t integer reflects the length in bytes of the blob.
exception
return any errors or warnings in this structure.

FileToImage

FileToImage() write the contents of a file to an image.

The format of the FileToImage method is:

MagickBooleanType FileToImage(Image *,const char *filename)

A description of each parameter follows:

image
the image.
filename
the filename.

GetBlobProperties

GetBlobProperties() returns information about an image blob.

The format of the GetBlobProperties method is:

const struct stat *GetBlobProperties(const Image *image)

A description of each parameter follows:

image
the image.

ImageToBlob

ImageToBlob() implements direct to memory image formats. It returns the image as a formatted blob and its length. The magick member of the Image structure determines the format of the returned blob (GIF, JPEG, PNG, etc.). This method is the equivalent of WriteImage(), but writes the formatted "file" to a memory buffer rather than to an actual file.

The format of the ImageToBlob method is:

void *ImageToBlob(const ImageInfo *image_info,Image *image,
  size_t *length,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
image
the image.
length
return the actual length of the blob.
exception
return any errors or warnings in this structure.

ImageToFile

ImageToFile() writes an image to a file. It returns MagickFalse if an error occurs otherwise MagickTrue.

The format of the ImageToFile method is:

 MagickBooleanType ImageToFile(Image *image,char *filename,
   ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
filename
Write the image to this file.
exception
return any errors or warnings in this structure.

ImagesToBlob

ImagesToBlob() implements direct to memory image formats. It returns the image sequence as a blob and its length. The magick member of the ImageInfo structure determines the format of the returned blob (GIF, JPEG, PNG, etc.)

Note, some image formats do not permit multiple images to the same image stream (e.g. JPEG). in this instance, just the first image of the sequence is returned as a blob.

The format of the ImagesToBlob method is:

void *ImagesToBlob(const ImageInfo *image_info,Image *images,
  size_t *length,ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info.
images
the image list.
length
return the actual length of the blob.
exception
return any errors or warnings in this structure.

InjectImageBlob

InjectImageBlob() injects the image with a copy of itself in the specified format (e.g. inject JPEG into a PDF image).

The format of the InjectImageBlob method is:

MagickBooleanType InjectImageBlob(const ImageInfo *image_info,
  Image *image,Image *inject_image,const char *format,
  ExceptionInfo *exception)

A description of each parameter follows:

image_info
the image info..
image
the image.
inject_image
inject into the image stream.
format
the image format.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Get or Set Image Channels

ChannelFxImageCombineImagesGetImageAlphaChannelSeparateImageSeparateImagesSetImageAlphaChannel

ChannelFxImage

ChannelFxImage() applies a channel expression to the specified image. The expression consists of one or more channels, either mnemonic or numeric (e.g. red, 1), separated by actions as follows:

<=> exchange two channels (e.g. red<=>blue) => copy one channel to another channel (e.g. red=>green) = assign a constant value to a channel (e.g. red=50) , write new image channels in the specified order (e.g. red, green) | add a new output image for the next set of channel operations ; move to the next input image for the source of channel data
For example, to create 3 grayscale images from the red, green, and blue channels of an image, use:
    -channel-fx "red; green; blue"

A channel without an operation symbol implies separate (i.e, semicolon).

The format of the ChannelFxImage method is:
Image *ChannelFxImage(const Image *image,const char *expression,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
expression
A channel expression.
exception
return any errors or warnings in this structure.

CombineImages

CombineImages() combines one or more images into a single image. The grayscale value of the pixels of each image in the sequence is assigned in order to the specified channels of the combined image. The typical ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc.

The format of the CombineImages method is:

Image *CombineImages(const Image *images,const ColorspaceType colorspace,
  ExceptionInfo *exception)

A description of each parameter follows:

images
the image sequence.
colorspace
the image colorspace.
exception
return any errors or warnings in this structure.

GetImageAlphaChannel

GetImageAlphaChannel() returns MagickFalse if the image alpha channel is not activated. That is, the image is RGB rather than RGBA or CMYK rather than CMYKA.

The format of the GetImageAlphaChannel method is:

MagickBooleanType GetImageAlphaChannel(const Image *image)

A description of each parameter follows:

image
the image.

SeparateImage

SeparateImage() separates a channel from the image and returns it as a grayscale image.

The format of the SeparateImage method is:

Image *SeparateImage(const Image *image,const ChannelType channel,
  ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
channel
the image channel.
exception
return any errors or warnings in this structure.

SeparateImages

SeparateImages() returns a separate grayscale image for each channel specified.

The format of the SeparateImages method is:

Image *SeparateImages(const Image *image,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
exception
return any errors or warnings in this structure.

SetImageAlphaChannel

SetImageAlphaChannel() activates, deactivates, resets, or sets the alpha channel.

The format of the SetImageAlphaChannel method is:

MagickBooleanType SetImageAlphaChannel(Image *image,
  const AlphaChannelOption alpha_type,ExceptionInfo *exception)

A description of each parameter follows:

image
the image.
alpha_type
The alpha channel type: ActivateAlphaChannel, AssociateAlphaChannel, CopyAlphaChannel, DeactivateAlphaChannel, DisassociateAlphaChannel, ExtractAlphaChannel, OffAlphaChannel, OnAlphaChannel, OpaqueAlphaChannel, SetAlphaChannel, ShapeAlphaChannel, and TransparentAlphaChannel.
exception
return any errors or warnings in this structure.
ImageMagick: MagickCore, C API for ImageMagick: Convert to and from Cipher Pixels