:effects - ImageMagick Image Effects Methods;/


NAME



+effects - ImageMagick Image Effects Methods




(

SYNOPSIS



<noisy_image=AddNoiseImage(image,noise_type)

6blurred_image=BlurImage(image,factor)

7despeckled_image=DespeckleImage(image)

4edged_image=EdgeImage(image,factor)

2embossed_image=EmbossImage(image)

3enhanced_image=EnhanceImage(image)

:imploded_image=ImplodeImage(image,factor)

:painted_image=OilPaintImage(image,radius)

Gstatus=PlasmaImage(image,segment_info,attenuate,depth)

4RaiseImage(image,raise_info,raised)

4noisy_image=ReduceNoiseImage(image)

Oshaded_image=ShadeImage(image,color_shading,azimuth,elevation)

;sharpened_image=SharpenImage(image,factor)

,SolarizeImage(image,factor)

7spread_image=SpreadImage(image,amount)

8swirled_image=SwirlImage(image,degrees)

Awaved_image=WaveImage(image,amplitude,frequency)




B

FUNCTION DESCRIPTIONS






2

AddNoiseImage



JMethod AddNoiseImage creates a new image that is a copy of an existing oneEwith noise added. It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.

+The format of the AddNoiseImage routine is:

8

        noisy_image=AddNoiseImage(image,noise_type)


(A description of each parameter follows:

:
noisy_image:


FMethod AddNoiseImage returns a pointer to the image after the noise isAminified. A null image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.$

noise_type:


IThe type of noise: Gaussian, multiplicative Gaussian, impulse, laplacian, or Poisson.






*

BlurImage



KMethod BlurImage creates a new image that is a copy of an existing one withGthe pixels blurred. It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.

CBlurImage convolves the pixel neighborhood with this blurring mask:



   1  2  1




   2  W  2




   1  2  1


KThe scan only processes pixels that have a full set of neighbors. Pixels inKthe top, bottom, left, and right pairs of rows and columns are omitted from the scan.

'The format of the BlurImage routine is:

2

        blurred_image=BlurImage(image,factor)


(A description of each parameter follows:

'
blurred_image:


KMethod BlurImage returns a pointer to the image after it is blurred. A null0image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.

factor:


IAn double value reflecting the percent weight to give to the center pixelof the neighborhood.






4

DespeckleImage



KMethod DespeckleImage creates a new image that is a copy of an existing oneKwith the speckle noise minified. It uses the eight hull algorithm describedGin Applied Optics, Vol. 24, No. 10, 15 May 1985, ``Geometric filter forESpeckle Reduction'', by Thomas R Crimmins. Each pixel in the image isKreplaced by one of its eight of its surrounding pixels using a polarity andInegative hull function. DespeckleImage allocates the memory necessary for?the new Image structure and returns a pointer to the new image.

,The format of the DespeckleImage routine is:

3

        despeckled_image=DespeckleImage(image)


(A description of each parameter follows:

*
despeckled_image:


@Method DespeckleImage returns a pointer to the image after it isCdespeckled. A null image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.






*

EdgeImage



KMethod EdgeImage creates a new image that is a copy of an existing one withJthe edges highlighted. It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.

IEdgeImage convolves the pixel neighborhood with this edge detection mask:



  -1 -1 -1




  -1  W -1




  -1 -1 -1


KThe scan only processes pixels that have a full set of neighbors. Pixels inKthe top, bottom, left, and right pairs of rows and columns are omitted from the scan.

'The format of the EdgeImage routine is:

0

        edged_image=EdgeImage(image,factor)


(A description of each parameter follows:

%
edged_image:


IMethod EdgeImage returns a pointer to the image after it is edged. A null0image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.

factor:


IAn double value reflecting the percent weight to give to the center pixelof the neighborhood.






.

EmbossImage



HMethod EmbossImage creates a new image that is a copy of an existing oneHwith the edge highlighted. It allocates the memory necessary for the new7Image structure and returns a pointer to the new image.

KEmbossImage convolves the pixel neighborhood with this edge detection mask:



  -1 -2  0




  -2  0  2




   0  2  1


KThe scan only processes pixels that have a full set of neighbors. Pixels inKthe top, bottom, left, and right pairs of rows and columns are omitted from the scan.

)The format of the EmbossImage routine is:

.

        embossed_image=EmbossImage(image)


(A description of each parameter follows:

(
embossed_image:


IMethod EmbossImage returns a pointer to the image after it is embossed. A5null image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.






0

EnhanceImage



IMethod EnhanceImage creates a new image that is a copy of an existing oneFwith the noise minified. It allocates the memory necessary for the new7Image structure and returns a pointer to the new image.

HEnhanceImage does a weighted average of pixels in a 5x5 cell around eachHtarget pixel. Only pixels in the 5x5 cell that are within a RGB distance+threshold of the target pixel are averaged.

DWeights assume that the importance of neighboring pixels is negatelyCproportional to the square of their distance from the target pixel.

KThe scan only processes pixels that have a full set of neighbors. Pixels inKthe top, bottom, left, and right pairs of rows and columns are omitted from the scan.

*The format of the EnhanceImage routine is:

/

        enhanced_image=EnhanceImage(image)


(A description of each parameter follows:

(
enhanced_image:


JMethod EnhanceImage returns a pointer to the image after it is enhanced. A5null image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.






0

ImplodeImage



IMethod ImplodeImage creates a new image that is a copy of an existing oneBwith the image pixels ``imploded'' by the specified percentage. ItHallocates the memory necessary for the new Image structure and returns apointer to the new image.

*The format of the ImplodeImage routine is:

6

        imploded_image=ImplodeImage(image,factor)


(A description of each parameter follows:

(
imploded_image:


JMethod ImplodeImage returns a pointer to the image after it is imploded. A5null image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.

factor:


8A double value that defines the extent of the implosion.






2

OilPaintImage



JMethod OilPaintImage creates a new image that is a copy of an existing oneJwith each pixel component replaced with the color of greatest frequency ina circular neighborhood.

+The format of the OilPaintImage routine is:

6

        painted_image=OilPaintImage(image,radius)


(A description of each parameter follows:

'
painted_image:


JMethod OilPaintImage returns a pointer to the image after it is `painted'.7A null image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.

radius:


@An unsigned int that is the radius of the circular neighborhood.






.

PlasmaImage



GMethod PlasmaImage initializes an image with plasma fractal values. TheKimage must be initialized with a base color and the random number generator%seeded before this routine is called.

)The format of the PlasmaImage routine is:

C

        status=PlasmaImage(image,segment_info,attenuate,depth)


(A description of each parameter follows:

status:


EMethod PlasmaImage returns True when the fractal process is complete.Otherwise False is returned.

image:


BThe address of a structure of type Image; returned from ReadImage.&

segment_info:


Hspecifies a structure of type SegmentInfo that defines the boundaries of/the area where the plasma fractals are applied.#

attenuate:


(specifies the plasma attenuation factor.

depth:


6this integer values define the plasma recursion depth.






,

RaiseImage



JMethod RaiseImage lightens and darkens the edges of an image to give a 3-Draised or lower effect.

(The format of the RaiseImage routine is:

0

        RaiseImage(image,raise_info,raised)


(A description of each parameter follows:


image:


)The address of a structure of type Image.$

raise_info:


DSpecifies a pointer to a XRectangle which defines the raised region.

raised:


EA value other than zero causes the image to have a 3-D raised effect,"otherwise it has a lowered effect.






8

ReduceNoiseImage



IMethod ReduceNoiseImage creates a new image that is a copy of an existingDone with the noise minified with a noise peak elimination filter. ItHallocates the memory necessary for the new Image structure and returns apointer to the new image.

HThe principal function of noise peak elimination filter is to smooth theCobjects within an image without losing edge information and withoutFcreating undesired structures. The central idea of the algorithm is toIreplace a pixel with its next neighbor in value within a 3 x 3 window, ifIthis pixel has been found to be noise. A pixel is defined as noise if andConly if this pixel is a maximum or minimum within the 3 x 3 window.

.The format of the ReduceNoiseImage routine is:

0

        noisy_image=ReduceNoiseImage(image)


(A description of each parameter follows:

%
noisy_image:


IMethod ReduceNoiseImage returns a pointer to the image after the noise isAminified. A null image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.






,

ShadeImage



GMethod ShadeImage creates a new image that is a copy of an existing oneHwith the image pixels shaded using a distance light source. It allocatesIthe memory necessary for the new Image structure and returns a pointer tothe new image.

(The format of the ShadeImage routine is:

K

        shaded_image=ShadeImage(image,color_shading,azimuth,elevation)


(A description of each parameter follows:

&
shaded_image:


KMethod ShadeImage returns a pointer to the image after it is shaded. A null0image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.'

color_shading:


IA value other than zero shades the red, green, and blue components of theimage.,

azimuth, elevation:


9A double value that indicates the light source direction.






0

SharpenImage



IMethod SharpenImage creates a new image that is a copy of an existing oneHwith the pixels sharpened. It allocates the memory necessary for the new7Image structure and returns a pointer to the new image.

HSharpenImage convolves the pixel neighborhood with this sharpening mask:



  -1 -2 -1




  -2  W -2




  -1 -2 -1


KThe scan only processes pixels that have a full set of neighbors. Pixels inKthe top, bottom, left, and right pairs of rows and columns are omitted from the scan.

*The format of the SharpenImage routine is:

7

        sharpened_image=SharpenImage(image,factor)


(A description of each parameter follows:

)
sharpened_image:


KMethod SharpenImage returns a pointer to the image after it is sharpened. A5null image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.

factor:


IAn double value reflecting the percent weight to give to the center pixelof the neighborhood.






2

SolarizeImage



JMethod SolarizeImage produces a 'solarization' effect seen when exposing a:photographic film to light during the development process.

+The format of the SolarizeImage routine is:

(

        SolarizeImage(image,factor)


(A description of each parameter follows:


image:


BThe address of a structure of type Image; returned from ReadImage.

factor:


<An double value that defines the extent of the solarization.






.

SpreadImage



HMethod SpreadImage creates a new image that is a copy of an existing oneKwith the image pixels randomly displaced. It allocates the memory necessaryCfor the new Image structure and returns a pointer to the new image.

)The format of the SpreadImage routine is:

3

        spread_image=SpreadImage(image,amount)


(A description of each parameter follows:

&
spread_image:


GMethod SpreadImage returns a pointer to the image after it is spread. A5null image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.

amount:


KAn unsigned value constraining the ``vicinity'' for choosing a random pixelto swap.






,

SwirlImage



GMethod SwirlImage creates a new image that is a copy of an existing oneHwith the image pixels ``swirled'' at a specified angle. It allocates theImemory necessary for the new Image structure and returns a pointer to the new image.

(The format of the SwirlImage routine is:

4

        swirled_image=SwirlImage(image,degrees)


(A description of each parameter follows:

'
swirled_image:


GMethod SwirlImage returns a pointer to the image after it is swirled. A5null image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage.!

degrees:


;An double value that defines the tightness of the swirling.






*

WaveImage



KMethod WaveImage creates a new image that is a copy of an existing one withCthe image pixels altered along a sine wave. It allocates the memoryFnecessary for the new Image structure and returns a pointer to the newimage.

'The format of the WaveImage routine is:

=

        waved_image=WaveImage(image,amplitude,frequency)


(A description of each parameter follows:

&
shaded_image:


JMethod WaveImage returns a pointer to the image after it is shaded. A null0image is returned if there is a memory shortage.

image:


BThe address of a structure of type Image; returned from ReadImage..

amplitude, frequency:


FA double value that indicates the amplitude and wavelength of the sinewave.