MagickClipPathImage
MagickClipPathImage() 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 MagickClipPathImage method is:
MagickBooleanType MagickClipPathImage(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.
DrawGetFillAlpha
DrawGetFillAlpha() returns the alpha used when drawing using the fill color or fill texture. Fully opaque is 1.0.
The format of the DrawGetFillAlpha method is:
double DrawGetFillAlpha(const DrawingWand *wand)
A description of each parameter follows:
wand
the drawing wand.
DrawGetStrokeAlpha
DrawGetStrokeAlpha() returns the alpha of stroked object outlines.
The format of the DrawGetStrokeAlpha method is:
double DrawGetStrokeAlpha(const DrawingWand *wand)
A description of each parameter follows:
wand
the drawing wand.
DrawPeekGraphicWand
DrawPeekGraphicWand() returns the current drawing wand.
The format of the PeekDrawingWand method is:
DrawInfo *DrawPeekGraphicWand(const DrawingWand *wand)
A description of each parameter follows:
wand
the drawing wand.
DrawPopGraphicContext
DrawPopGraphicContext() 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 DrawPopGraphicContext method is:
MagickBooleanType DrawPopGraphicContext(DrawingWand *wand)
A description of each parameter follows:
wand
the drawing wand.
DrawPushGraphicContext
DrawPushGraphicContext() 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 DrawPushGraphicContext method is:
MagickBooleanType DrawPushGraphicContext(DrawingWand *wand)
A description of each parameter follows:
wand
the drawing wand.
DrawSetFillAlpha
DrawSetFillAlpha() sets the alpha to use when drawing using the fill color or fill texture. Fully opaque is 1.0.
The format of the DrawSetFillAlpha method is:
void DrawSetFillAlpha(DrawingWand *wand,const double fill_alpha)
A description of each parameter follows:
wand
the drawing wand.
fill_alpha
fill alpha
DrawSetStrokeAlpha
DrawSetStrokeAlpha() specifies the alpha of stroked object outlines.
The format of the DrawSetStrokeAlpha method is:
void DrawSetStrokeAlpha(DrawingWand *wand,const double stroke_alpha)
A description of each parameter follows:
wand
the drawing wand.
stroke_alpha
stroke alpha. The value 1.0 is opaque.
MagickColorFloodfillImage
MagickColorFloodfillImage() 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 MagickColorFloodfillImage method is:
MagickBooleanType MagickColorFloodfillImage(MagickWand *wand, const PixelWand *fill,const double fuzz,const PixelWand *bordercolor, const long x,const long y)
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.
MagickDescribeImage
MagickDescribeImage() identifies an image by printing its attributes to the file. Attributes include the image width, height, size, and others.
The format of the MagickDescribeImage method is:
const char *MagickDescribeImage(MagickWand *wand)
A description of each parameter follows:
wand
the magick wand.
MagickFlattenImages
MagickFlattenImages() merges a sequence of images. This useful for combining Photoshop layers into a single image.
The format of the MagickFlattenImages method is:
MagickWand *MagickFlattenImages(MagickWand *wand)
A description of each parameter follows:
wand
the magick wand.
MagickGetImageAttribute
MagickGetImageAttribute() returns a value associated with the specified property. Use MagickRelinquishMemory() to free the value when you are finished with it.
The format of the MagickGetImageAttribute method is:
char *MagickGetImageAttribute(MagickWand *wand,const char *property)
A description of each parameter follows:
wand
the magick wand.
property
the property.
MagickGetImageMatte
MagickGetImageMatte() returns MagickTrue if the image has a matte channel otherwise MagickFalse.
The format of the MagickGetImageMatte method is:
unsigned long MagickGetImageMatte(MagickWand *wand)
A description of each parameter follows:
wand
the magick wand.
MagickGetImagePixels
MagickGetImagePixels() 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, long, 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:
MagickGetImagePixels(wand,0,0,640,1,"RGB",CharPixel,pixels);
The format of the MagickGetImagePixels method is:
MagickBooleanType MagickGetImagePixels(MagickWand *wand, const long x,const long y,const unsigned long columns, const unsigned long 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 = 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.
MagickGetImageSize
MagickGetImageSize() returns the image length in bytes.
The format of the MagickGetImageSize method is:
MagickBooleanType MagickGetImageSize(MagickWand *wand, MagickSizeType *length)
A description of each parameter follows:
wand
the magick wand.
length
the image length in bytes.
MagickMapImage
MagickMapImage() replaces the colors of an image with the closest color from a reference image.
The format of the MagickMapImage method is:
MagickBooleanType MagickMapImage(MagickWand *wand, const MagickWand *map_wand,const MagickBooleanType dither)
A description of each parameter follows:
wand
the magick wand.
map
the map wand.
dither
Set this integer value to something other than zero to dither the mapped image.
MagickMatteFloodfillImage
MagickMatteFloodfillImage() changes the transparency value of any pixel that matches target and is an immediate neighbor. If the method FillToBorderMethod is specified, the transparency value is changed for any neighbor pixel that does not match the bordercolor member of image.
The format of the MagickMatteFloodfillImage method is:
MagickBooleanType MagickMatteFloodfillImage(MagickWand *wand, const double alpha,const double fuzz,const PixelWand *bordercolor, const long x,const long y)
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.
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.
MagickMosaicImages
MagickMosaicImages() inlays an image sequence to form a single coherent picture. It returns a wand with each image in the sequence composited at the location defined by the page offset of the image.
The format of the MagickMosaicImages method is:
MagickWand *MagickMosaicImages(MagickWand *wand)
A description of each parameter follows:
wand
the magick wand.
MagickOpaqueImage
MagickOpaqueImage() changes any pixel that matches color with the color defined by fill.
The format of the MagickOpaqueImage method is:
MagickBooleanType MagickOpaqueImage(MagickWand *wand, const PixelWand *target,const PixelWand *fill,const double fuzz)
A description of each parameter follows:
wand
the magick wand.
channel
the channel(s).
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.
MagickPaintFloodfillImage
MagickPaintFloodfillImage() 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 MagickPaintFloodfillImage method is:
MagickBooleanType MagickPaintFloodfillImage(MagickWand *wand, const ChannelType channel,const PixelWand *fill,const double fuzz, const PixelWand *bordercolor,const long x,const long y)
A description of each parameter follows:
wand
the magick wand.
channel
the channel(s).
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.
MagickPaintOpaqueImage
MagickPaintOpaqueImage() changes any pixel that matches color with the color defined by fill.
The format of the MagickPaintOpaqueImage method is:
MagickBooleanType MagickPaintOpaqueImage(MagickWand *wand, const PixelWand *target,const PixelWand *fill,const double fuzz) MagickBooleanType MagickPaintOpaqueImageChannel(MagickWand *wand, const ChannelType channel,const PixelWand *target, const PixelWand *fill,const double fuzz)
A description of each parameter follows:
wand
the magick wand.
channel
the channel(s).
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.
MagickPaintTransparentImage
MagickPaintTransparentImage() changes any pixel that matches color with the color defined by fill.
The format of the MagickPaintTransparentImage method is:
MagickBooleanType MagickPaintTransparentImage(MagickWand *wand, const PixelWand *target,const double alpha,const double fuzz)
A description of each parameter follows:
wand
the magick wand.
target
Change this target color to specified opacity 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.
MagickSetImageAttribute
MagickSetImageAttribute() associates a property with an image.
The format of the MagickSetImageAttribute method is:
MagickBooleanType MagickSetImageAttribute(MagickWand *wand, const char *property,const char *value)
A description of each parameter follows:
wand
the magick wand.
property
the property.
value
the value.
MagickSetImageIndex
MagickSetImageIndex() set the current image to the position of the list specified with the index parameter.
The format of the MagickSetImageIndex method is:
MagickBooleanType MagickSetImageIndex(MagickWand *wand,const long index)
A description of each parameter follows:
wand
the magick wand.
index
the scene number.
MagickTransparentImage
MagickTransparentImage() changes any pixel that matches color with the color defined by fill.
The format of the MagickTransparentImage method is:
MagickBooleanType MagickTransparentImage(MagickWand *wand, const PixelWand *target,const double alpha,const double fuzz)
A description of each parameter follows:
wand
the magick wand.
target
Change this target color to specified opacity 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.
MagickRegionOfInterestImage
MagickRegionOfInterestImage() extracts a region of the image and returns it as a new wand.
The format of the MagickRegionOfInterestImage method is:
MagickWand *MagickRegionOfInterestImage(MagickWand *wand, const unsigned long width,const unsigned long height,const long x, const long 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.
MagickSetImagePixels
MagickSetImagePixels() 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, long, 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:
MagickSetImagePixels(wand,0,0,640,1,"RGB",CharPixel,pixels);
The format of the MagickSetImagePixels method is:
MagickBooleanType MagickSetImagePixels(MagickWand *wand, const long x,const long y,const unsigned long columns, const unsigned long 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 = 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, 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.
MagickWriteImageBlob
MagickWriteImageBlob() implements direct to memory image formats. It returns the image as a blob and its length. Use MagickSetFormat() to set the format of the returned blob (GIF, JPEG, PNG, etc.).
Use MagickRelinquishMemory() to free the blob when you are done with it.
The format of the MagickWriteImageBlob method is:
unsigned char *MagickWriteImageBlob(MagickWand *wand,size_t *length)
A description of each parameter follows:
wand
the magick wand.
length
the length of the blob.
PixelGetNextRow
PixelGetNextRow() returns the next row as an array of pixel wands from the pixel iterator.
The format of the PixelGetNextRow method is:
PixelWand **PixelGetNextRow(PixelIterator *iterator, unsigned long *number_wands)
A description of each parameter follows:
iterator
the pixel iterator.
number_wands
the number of pixel wands.
PixelIteratorGetException
PixelIteratorGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.
The format of the PixelIteratorGetException method is:
char *PixelIteratorGetException(const Pixeliterator *iterator, ExceptionType *severity)
A description of each parameter follows:
iterator
the pixel iterator.
severity
the severity of the error is returned here.