NAME

effect - ImageMagick Image Effects Methods


SYNOPSIS

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

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

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

Image * ColorizeImage( const Image *image, const char *opacity, const PixelPacket target, ExceptionInfo *exception );

Image * ConvolveImage( const Image *image, const unsigned int order, const double *kernel, ExceptionInfo *exception );

Image * DespeckleImage( const Image *image, ExceptionInfo *exception );

Image * EdgeImage( const Image *image, const double radius, ExceptionInfo *exception );

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

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

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

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

Image * MedianFilterImage( const Image *image, const double radius, ExceptionInfo *exception );

Image * MorphImages( const Image *image, const unsigned long number_frames, ExceptionInfo *exception );

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

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

unsigned int PlasmaImage( Image *image, const SegmentInfo *segment, int attenuate, int depth );

Image * ReduceNoiseImage( const Image *image, const double radius, ExceptionInfo *exception );

Image * ShadeImage( const Image *image, const unsigned int color_shading, double azimuth, double elevation, ExceptionInfo *exception );

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

void SolarizeImage( Image *image, const double threshold );

Image * SpreadImage( const Image *image, const unsigned int radius, ExceptionInfo *exception );

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

Image * StereoImage( const Image *image, const Image *offset_image, ExceptionInfo *exception );

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

unsigned int ThresholdImage( Image *image, const double threshold );

Image * UnsharpMaskImage( const Image *image, const double radius, const double sigma, const double amount, const double threshold, ExceptionInfo *exception );

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


FUNCTION DESCRIPTIONS

AddNoiseImage

AddNoiseImage() adds random noise to the image.

The format of the AddNoiseImage method is:

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

A description of each parameter follows:

image:
The image.

noise_type:
The type of noise: Uniform, Gaussian, Multiplicative, Impulse, Laplacian, or Poisson.

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:

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.

CharcoalImage

Method 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:

charcoal_image:
Method CharcoalImage returns a pointer to the image after it is embossed. A null image is returned if there is a memory shortage.

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

The format of the ColorizeImage method is:

Image *ColorizeImage ( const Image *image, const char *opacity, const PixelPacket target, ExceptionInfo *exception );

A description of each parameter follows:

image:
The image.

opacity:
A character string indicating the level of opacity as a percentage.

target:
A color value.

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 unsigned int order, const double *kernel, ExceptionInfo *exception );

A description of each parameter follows:

image:
The image.

order:
The number of columns and rows in the filter kernel.

kernel:
An array of double representing the convolution kernel.

exception:
Return any errors or warnings in this structure.

DespeckleImage

Despeckle() reduces the speckle noise in an image while perserving the edges of the original image.

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 Edge ( ) 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.

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.

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 BlurImage method is:

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

A description of each parameter follows:

blur_image:
Method GaussianBlurImage returns a pointer to the image after it is blur. A null image is returned if there is a memory shortage.

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.

ImplodeImage

Method 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, 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.

exception:
Return any errors or warnings in this structure.

MedianFilterImage

MedianFilterImage() applies a digital filter that improves the quality of a noisy image. Each pixel is replaced by the median in a set of neighboring pixels as defined by radius.

The algorithm was contributed by Mike Edmonds and implements an insertion sort for selecting median color-channel values. For more on this algorithm see ``Skip Lists: A probabilistic Alternative to Balanced Trees'' by William Pugh in the June 1990 of Communications of the ACM.

The format of the MedianFilterImage method is:

Image *MedianFilterImage ( 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.

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 unsigned long 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.

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.

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, ExceptionInfo *exception );

A description of each parameter follows:

image:
The image.

radius:
The radius of the circular neighborhood.

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:

unsigned int PlasmaImage ( Image *image, const SegmentInfo *segment, int attenuate, int depth );

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.

ReduceNoiseImage

ReduceNoiseImage() smooths the contours of an image while still preserving edge information. The algorithm works by replacing each pixel with its neighbor closest in value. A neighbor is defined by radius. Use a radius of 0 and ReduceNoise ( ) selects a suitable radius for you.

The format of the ReduceNoiseImage method is:

Image *ReduceNoiseImage ( 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.

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 unsigned int color_shading, double azimuth, double elevation, ExceptionInfo *exception );

A description of each parameter follows:

image:
The image.

color_shading:
A value other than zero shades the red, green, and blue components of the image.

azimuth, elevation:
Define the light source direction.

exception:
Return any errors or warnings in this structure.

SharpenImage

SharpenImage() 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 SharpenImage ( ) selects a suitable radius for you.

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.

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 MaxRGB and is a measure of the extent of the solarization.

The format of the SolarizeImage method is:

void SolarizeImage ( Image *image, const double threshold );

A description of each parameter follows:

image:
The image.

threshold:
Define the extent of the solarization.

SpreadImage

SpreadImage() is a special effects method that randomly displaces each pixel in a block defined by the radius parameter.

The format of the SpreadImage method is:

Image *SpreadImage ( const Image *image, const unsigned int radius, ExceptionInfo *exception );

A description of each parameter follows:

image:
The image.

radius:
Choose a random pixel in a neighborhood of this extent.

exception:
Return any errors or warnings in this structure.

SteganoImage

Use SteganoImage() to hide 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.

StereoImage

StereoImage() 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 StereoImage method is:

Image *StereoImage ( const Image *image, const Image *offset_image, ExceptionInfo *exception );

A description of each parameter follows:

stereo_image:
Method StereoImage returns a pointer to the stereo image. A null image is returned if there is a memory shortage.

image:
The image.

offset_image:
Another image.

exception:
Return any errors or warnings in this structure.

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, ExceptionInfo *exception );

A description of each parameter follows:

image:
The image.

degrees:
Define the tightness of the swirling effect.

exception:
Return any errors or warnings in this structure.

ThresholdImage

ThresholdImage() 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 ThresholdImage method is:

unsigned int ThresholdImage ( Image *image, const double threshold );

A description of each parameter follows:

image:
The image.

threshold:
Define the threshold value

UnsharpMaskImage

UnsharpMaskImage() sharpens an image. We convolve the image with a Gaussian operatorof 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.

amount:
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 amount.

exception:
Return any errors or warnings in this structure.

WaveImage

The WaveImage() filter 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, ExceptionInfo *exception );

A description of each parameter follows:

image:
The image.

amplitude, frequency:
Define the amplitude and wave_length of the sine wave.

exception:
Return any errors or warnings in this structure.