NAME SYNOPSIS FUNCTION DESCRIPTIONS DestroyMagickWand MagickAdaptiveThresoldImage MagickAddNoiseImage MagickAffineTransformImage MagickAnnotateImage MagickAnimateImages MagickAffineTransformImage MagickBlurImage MagickBorderImage MagickChannelImage MagickCharcoalImage MagickChopImage MagickCloneWand MagickClipImage MagickCoelesceImage MagickBorderImage MagickContrastImage MagickCropImage MagickDisplayImage MagickDisplayImages MagickDrawImage MagickGetException MagickGetFilename MagickGetImageFilename MagickGetImagePixels MagickGetNumberOfImages MagickGetSize MagickNextImage MagickPreviousImage MagickReadImage MagickRemoveImage MagickResizeImage MagickRotateImage MagickSetFuzzyColorDistance MagickSetFilename MagickSetImage MagickSetImageFilename MagickSetImagePixels MagickSetSize MagickWriteImage MagickWriteImages NewMagickWand # NAME magick_wand - Magick Wand # SYNOPSIS unsigned int DestroyMagickWand( MagickWand *wand ); unsigned int MagickAddNoiseImage( MagickWand *wand, const NoiseType noise_type ); unsigned int MagickAffineTransformImage( MagickWand *wand, const DrawingWand *draw_wand ); unsigned int MagickAffineTransformImage( MagickWand *wand, const DrawingWand *draw_wand ); unsigned int MagickAnimateImages( MagickWand *wand, const char *server_name ); unsigned int MagickAnnotateImage( MagickWand *wand, const DrawingWand *draw_wand ); unsigned int MagickBlurImage( MagickWand *wand, const double radius, const double sigma ); unsigned int MagickBorderImage( MagickWand *wand, const unsigned long width, const unsigned long height, PixelWand *bordercolor ); unsigned int MagickBorderImage( MagickWand *wand, const unsigned long width, const unsigned long height, PixelWand *bordercolor ); unsigned int MagickChannelImage( MagickWand *wand, const ChannelType channel ); unsigned int MagickCharcoalImage( MagickWand *wand, const double radius, const double sigma ); unsigned int MagickChopImage( MagickWand *wand, const unsigned long width, const unsigned long height, const long x, const long y ); unsigned int MagickClipImage( MagickWand *wand ); unsigned int MagickCloneWand( MagickWand *wand ); unsigned int MagickContrastImage( MagickWand *wand, const unsigned int sharpen ); unsigned int MagickCropImage( MagickWand *wand, const unsigned long width, const unsigned long height, const long x, const long y ); unsigned int MagickDisplayImage( MagickWand *wand, const char *server_name ); unsigned int MagickDisplayImages( MagickWand *wand, const char *server_name ); unsigned int MagickDrawImage( MagickWand *wand, const DrawingWand *draw_wand ); unsigned int MagickGetException( MagickWand *wand, char ** description ); const char * MagickGetFilename( MagickWand *wand ); const char MagickGetImageFilename( MagickWand *wand ); unsigned int MagickGetImagePixels( MagickWand *wand, const long x_offset, const long y_offset, const unsigned long columns, const unsigned long rows, const char *map, const StorageType storage, void *pixels ); unsigned long MagickGetNumberOfImages( MagickWand *wand ); void MagickGetSize( MagickWand *wand, unsigned long *columns, unsigned long *rows ); const char MagickNextImage( MagickWand *wand ); const char MagickPreviousImage( MagickWand *wand ); unsigned int MagickReadImage( MagickWand *wand, const char *filename ); unsigned int MagickRemoveImage( MagickWand *wand ); unsigned int MagickResizeImage( MagickWand *wand, const unsigned long columns, const unsigned long rows, const FilterTypes filter, const double blur ); unsigned int MagickRotateImage( MagickWand *wand, const double degrees ); void MagickSetFilename( MagickWand *wand, const char *filename ); void MagickSetFuzzyColorDistance( MagickWand *wand, const double distance ); const char MagickSetImage( MagickWand *wand, const unsigned long scene ); unsigned int MagickSetImageFilename( MagickWand *wand, const char *filename ); unsigned int MagickSetImagePixels( MagickWand *wand, const long x_offset, const long y_offset, const unsigned long columns, const unsigned long rows, const char *map, const StorageType storage, void *pixels ); void MagickSetSize( MagickWand *wand, const unsigned long columns, const unsigned long rows ); unsigned int MagickWriteImage( MagickWand *wand, const char *filename ); unsigned int MagickWriteImages( MagickWand *wand, const char *filename ); MagickWand NewMagickWand( void ); # FUNCTION DESCRIPTIONS ## DestroyMagickWand DestroyMagickWand() deallocates memory associated with an MagickWand. The format of the DestroyMagickWand method is: unsigned int DestroyMagickWand ( MagickWand *wand ); A description of each parameter follows: wand: The magick wand. ## MagickAdaptiveThresoldImage `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:
        unsigned int MagickAdaptiveThresholdImage(MagickWand *wand,
          const unsigned long width,const unsigned long height,const long offset)
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 offset. ## MagickAddNoiseImage MagickAddNoiseImage() adds random noise to the image. The format of the MagickAddNoiseImage method is: unsigned int MagickAddNoiseImage ( MagickWand *wand, const NoiseType noise_type ); A description of each parameter follows: wand: The magick wand. noise_type: The type of noise: Uniform, Gaussian, Multiplicative, Impulse, Laplacian, or Poisson. ## MagickAffineTransformImage MagickAffineTransformImage() transforms an image as dictated by the affine matrix of the drawing wand. The format of the MagickAffineTransformImage method is: unsigned int MagickAffineTransformImage ( MagickWand *wand, const DrawingWand *draw_wand ); A description of each parameter follows: wand: The magick wand. draw_wand: The draw wand. ## MagickAnnotateImage MagickAnnotateImage() annotates an image with text. The format of the MagickAnnotateImage method is: unsigned int MagickAnnotateImage ( MagickWand *wand, const DrawingWand *draw_wand ); A description of each parameter follows: wand: The magick wand. draw_wand: The draw wand. ## MagickAnimateImages MagickAnimateImages() animates an image or image sequence. The format of the MagickAnimateImages method is: unsigned int MagickAnimateImages ( MagickWand *wand, const char *server_name ); A description of each parameter follows: wand: The magick wand. server_name: The X server name. ## MagickAffineTransformImage `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:
        unsigned int MagickBlackThresholdImage(MagickWand *wand,
          const PixelWant *pixel_wand)
A description of each parameter follows: wand: The magick wand. pixel_wand: The pixel wand. ## 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: unsigned int MagickBlurImage ( 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. ## MagickBorderImage MagickBorderImage() surrounds the image with a border of the color defined by the bordercolor pixel wand. The format of the MagickBorderImage method is: unsigned int MagickBorderImage ( MagickWand *wand, const unsigned long width, const unsigned long height, PixelWand *bordercolor ); A description of each parameter follows: wand: The magick wand. width: The border width. height: The border height. bordercolor: The border color pixel wand. ## MagickChannelImage MagickChannelImage() extracts a channel from the image. A channel is a particular color component of each pixel in the image. The format of the MagickChannelImage method is: unsigned int MagickChannelImage ( MagickWand *wand, const ChannelType channel ); A description of each parameter follows: wand: The magick wand. channel: Identify which channel to extract: RedChannel, GreenChannel, BlueChannel, OpacityChannel, CyanChannel, MagentaChannel, YellowChannel, or BlackChannel. ## MagickCharcoalImage MagickCharcoalImage() simulates a charcoal drawing. The format of the MagickCharcoalImage method is: unsigned int 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: unsigned int MagickChopImage ( 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. ## MagickCloneWand MagickCloneWand() deallocates memory associated with an MagickWand. The format of the MagickCloneWand method is: unsigned int MagickCloneWand ( MagickWand *wand ); A description of each parameter follows: wand: The magick wand. ## MagickClipImage MagickClipImage() ets the image clip mask based any clipping path information if it exists. The format of the MagickClipImage method is: unsigned int MagickClipImage ( MagickWand *wand ); A description of each parameter follows: wand: The magick wand. ## MagickCoelesceImage `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. ## MagickBorderImage `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. 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 MagickColorFloodfillImage method is:
        unsigned int MagickColorFloodfillImage(MagickWand *wand,const long x,
          const long y,PixelWand *fill,PixelWand *bordercolor)
A description of each parameter follows: wand: The magick wand. x,y: The starting location of the operation. height: The floodfill height. floodfillcolor: The floodfill color pixel wand. ## 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: unsigned int MagickContrastImage ( MagickWand *wand, const unsigned int sharpen ); A description of each parameter follows: wand: The magick wand. sharpen: Increase or decrease image contrast. ## MagickCropImage MagickCropImage() extracts a region of the image. The format of the MagickCropImage method is: unsigned int MagickCropImage ( 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. ## MagickDisplayImage MagickDisplayImage() displays an image. The format of the MagickDisplayImage method is: unsigned int 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: unsigned int MagickDisplayImages ( MagickWand *wand, const char *server_name ); A description of each parameter follows: wand: The magick wand. server_name: The X server name. ## MagickDrawImage MagickDrawImage() draw an image the specified number of degrees. The format of the MagickDrawImage method is: unsigned int MagickDrawImage ( MagickWand *wand, const DrawingWand *draw_wand ); A description of each parameter follows: wand: The magick wand. draw_wand: The draw 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: unsigned int MagickGetException ( MagickWand *wand, char **description ); A description of each parameter follows: wand: The magick wand. description: A description of the error. ## MagickGetFilename MagickGetFilename() returns the filename associated with an image sequence. The format of the MagickGetFilename method is: const char *MagickGetFilename ( 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: const char MagickGetImageFilename ( 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 False on success otherwise True 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, 0, 640, 1, "RGB", CharPixel, pixels );; The format of the MagickGetImagePixels method is: unsigned int MagickGetImagePixels ( MagickWand *wand, const long x_offset, const long y_offset, 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_offset, y_offset, 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, C = cyan, Y = yellow, M = magenta, K = black, or I = intensity (for grayscale). storage: Define the data type of the pixels. Float and double types are expected to be normalized [0..1] otherwise [0..MaxRGB]. 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. ## MagickGetNumberOfImages MagickGetNumberOfImages() returns the number of images associated with a magick wand. The format of the MagickGetNumberOfImages method is: unsigned long MagickGetNumberOfImages ( MagickWand *wand ); A description of each parameter follows: wand: The magick wand. ## MagickGetSize MagickGetSize() returns the size associated with the magick wand. The format of the MagickGetSize method is: void MagickGetSize ( MagickWand *wand, unsigned long *columns, unsigned long *rows ); A description of each parameter follows: wand: The magick wand. columns: The width in pixels. height: The height in pixels. ## MagickNextImage MagickNextImage() selects the next image associated with a magick wand. The format of the MagickNextImage method is: const char MagickNextImage ( MagickWand *wand ); A description of each parameter follows: wand: The magick wand. ## MagickPreviousImage MagickPreviousImage() selects the previous image associated with a magick wand. The format of the MagickPreviousImage method is: const char MagickPreviousImage ( MagickWand *wand ); A description of each parameter follows: wand: The magick wand. ## MagickReadImage MagickReadImage() reads an image or image sequence. The format of the MagickReadImage method is: unsigned int MagickReadImage ( MagickWand *wand, const char *filename ); A description of each parameter follows: wand: The magick wand. filename: The image filename. ## MagickRemoveImage MagickRemoveImage() removes an image from the image list. The format of the MagickRemoveImage method is: unsigned int MagickRemoveImage ( MagickWand *wand ); A description of each parameter follows: wand: The magick wand. ## MagickResizeImage MagickResizeImage() scales an image to the desired dimensions with one of these filters:
      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 MagickResizeImage method is: unsigned int MagickResizeImage ( MagickWand *wand, const unsigned long columns, const unsigned long rows, const FilterTypes filter, const double blur ); 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. blur: The blur factor where > 1 is blurry, < 1 is sharp. ## MagickRotateImage MagickRotateImage() rotates an image the specified number of degrees. The format of the MagickRotateImage method is: unsigned int MagickRotateImage ( MagickWand *wand, const double degrees ); A description of each parameter follows: wand: The magick wand. degrees: The number of degrees to rotate the image. ## MagickSetFuzzyColorDistance MagickSetFuzzyColorDistance() colors within the specified RGB distance- squared are treated by certain ImageMagick algorithms as the same color. The format of the MagickSetFuzzyColorDistance method is: void MagickSetFuzzyColorDistance ( MagickWand *wand, const double distance ); A description of each parameter follows: wand: The magick wand. distance: RGB distance-squared. ## MagickSetFilename MagickSetFilename() sets the image filename before you read or write an image file. The format of the MagickSetFilename method is: void MagickSetFilename ( MagickWand *wand, const char *filename ); A description of each parameter follows: wand: The magick wand. filename: The image filename. ## MagickSetImage MagickSetImage() selects the image associated with a magick wand. The format of the MagickSetImage method is: const char MagickSetImage ( MagickWand *wand, const unsigned long scene ); A description of each parameter follows: wand: The magick wand. scene: The scene number. ## MagickSetImageFilename MagickSetImageFilename() sets the filename of a particular image in a sequence. The format of the MagickSetImageFilename method is: unsigned int MagickSetImageFilename ( MagickWand *wand, const char *filename ); A description of each parameter follows: wand: The magick wand. filename: The image filename. ## MagickSetImagePixels MagickSetImagePixels() accepts pixel data and stores it in the image at the location you specify. The method returns False on success otherwise True 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 want to upload the first scanline of a 640x480 image from character data in red-green-blue order: MagickSetImagePixels ( wand, 0, 0, 0, 640, 1, "RGB", CharPixel, pixels );; The format of the MagickSetImagePixels method is: unsigned int MagickSetImagePixels ( MagickWand *wand, const long x_offset, const long y_offset, 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_offset, y_offset, columns, rows: These values define the perimeter of a region of pixels you want to define. map: This string reflects the pixel data type and expected ordering of the pixel array. The first character of the map must be one of: ``C'' for character, ``S'' for short, ``I'' for integer, ``L'' for long, ``F'' for float, or ``D'' for double. Note, Float and double types are normalized to [0..1] otherwise [0..MaxRGB]. The remaining characters of the map reflect the ordering of the pixel array. It can be any combination or order of R = red, G = green, B = blue, A = alpha, C = cyan, Y = yellow, M = magenta, K = black, or I = intensity (for grayscale). storage: Define the data type of the pixels. Float and double types are expected to be normalized [0..1] otherwise [0..MaxRGB]. 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. ## 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: void MagickSetSize ( MagickWand *wand, const unsigned long columns, const unsigned long rows ); A description of each parameter follows: wand: The magick wand. columns: The width in pixels. height: The height in pixels. ## MagickWriteImage MagickWriteImage() writes an image. The format of the MagickWriteImage method is: unsigned int MagickWriteImage ( MagickWand *wand, const char *filename ); A description of each parameter follows: wand: The magick wand. filename: The image filename. ## MagickWriteImages MagickWriteImages() writes an image or image sequence. The format of the MagickWriteImages method is: unsigned int MagickWriteImages ( MagickWand *wand, const char *filename ); A description of each parameter follows: wand: The magick wand. filename: The image filename. ## NewMagickWand NewMagickWand() returns a wand required for all other methods in the API. The format of the NewMagickWand method is: MagickWand NewMagickWand ( void ); "Image manipulation software that works like magick"