. image - ImageMagick Image Routines�� �  0 




NAME

"image - ImageMagick Image Routines








SYNOPSIS

:allocated_image=AllocateImage(image_info)

3AnnotateImage(image,annotate_info)

&AverageImages(images)

>bordered_image=BorderImage(image,border_info)

6chop_image=ChopImage(image,chop_info)

Hclone_image=CloneImage(image,columns,rows,clone_pixels)

"CloseImage(image)

<ColorFloodfillImage(image,x,y,xcolor,delta)

<ColorizeImage(image,opaque_color,pen_color)

-CommentImage(image,comments)

PCompositeImage(image,compose,composite_image,x_offset,y_offset)

(CompressColormap(image)

%CondenseImage(image)

-ContrastImage(image,sharpen)

9cropped_image=CropImage(image,crop_info)

2DescribeImage(image,file,verbose)

$DestroyImage(image)

-DestroyImageInfo(image_info)

%DestroyImages(image)

/DrawImage(image,annotate_info)

%EqualizeImage(image)

/flipped_image=FlipImage(image)

/flopped_image=FlopImage(image)

:framed_image=FrameImage(image,frame_info)

(GammaImage(image,gamma)

/GetAnnotateInfo(annotate_info)

)GetImageInfo(image_info)

,status=IsGeometry(geometry)

*status=IsGrayImage(image)

0status=IsMonochromeImage(image)

5status=IsSubimage(geometry,pedantic)

(LabelImage(image,label)

>images=ListToGroupImage(images,number_images)

4magnified_image=MagnifyImage(image)

;MatteFloodfillImage(image,x,y,matte,delta)

2minified_image=MinifyImage(image)

.ModulateImage(image,modulate)

9MogrifyImage(image_info,argc,argv,image)

;MogrifyImages(image_info,argc,argv,images)

-NegateImage(image,grayscale)

&NormalizeImage(image)

1OpenImage(image_info,image,type)

Jflags=ParseImageGeometry(image_geometry,x,y,width,height)

<filesize=PingImage(image_info,columns,rows)

4RGBTransformImage(image,colorspace)

@rolled_image=RollImage(image,x_offset,y_offset)

>sampled_image=SampleImage(image,columns,rows)

<scaled_image=ScaleImage(image,columns,rows)

1SetImageInfo(image_info,rectify)

'SetNumberScenes(image)

Astereo_image=StereoImage(left_image,right_image)

!SyncImage(image)

-TextureImage(image,filename)

0ThresholdImage(image,threshold)

CTransformImage(image,crop_geometry,image_geometry)

4TransformRGBImage(image,colorspace)

.TransparentImage(image,color)

.status=UncondenseImage(image)

Bzoomed_image=ZoomImage(image,columns,rows,filter)






9

FUNCTION DESCRIPTIONS






)

AllocateImage

HFunction AllocateImage allocates an Image structure and initializes eachfield to a default value.

+The format of the AllocateImage routine is:

6

        allocated_image=AllocateImage(image_info)


(A description of each parameter follows:



-
allocated_image:
JFunction AllocateImage returns a pointer to an image structure initializedJto default values. A null image is returned if there is a memory shortage.



image_info:
-Specifies a pointer to a ImageInfo structure.






1

AllocateNextImage

GFunction AllocateNextImage allocates an Image structure and initializeseach field to a default value.

/The format of the AllocateNextImage routine is:

(

    AllocateImage(image_info,image)


(A description of each parameter follows:




image_info:
-Specifies a pointer to a ImageInfo structure.



image:
)The address of a structure of type Image.






)

AnnotateImage

CFunction AnnotateImage annotates an image with test. Optionally theHannotation can include the image filename, type, width, height, or scene.number by embedding special format characters.

+The format of the AnnotateImage routine is:

/

        AnnotateImage(image,annotate_info)


(A description of each parameter follows:




image:
)The address of a structure of type Image.



annotate_info:
(The address of a AnnotateInfo structure.






)

AverageImages

JFunction AverageImages averages a set of images. All the input images mustbe the same size in pixels.

*The format of the AverageImage routine is:

"

        AverageImages(images)


(A description of each parameter follows:




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






%

BorderImage

DFunction BorderImage takes an image and puts a border around it of aEparticular color. It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.

)The format of the BorderImage routine is:

:

        bordered_image=BorderImage(image,border_info)


(A description of each parameter follows:




bordered_image:
JFunction BorderImage returns a pointer to the bordered image. A null image,is returned if there is a a memory shortage.



image:
)The address of a structure of type Image.



border_info:
DSpecifies a pointer to a XRectangle which defines the border region.






!

ChopImage

IFunction ChopImage creates a new image that is a subregion of an existingFone. It allocates the memory necessary for the new Image structure and#returns a pointer to the new image.

'The format of the ChopImage routine is:

2

        chop_image=ChopImage(image,chop_info)


(A description of each parameter follows:




chop_image:
GFunction ChopImage returns a pointer to the chop image. A null image isKreturned if there is a a memory shortage or if the image width or height iszero.



image:
)The address of a structure of type Image.



chop_info:
FSpecifies a pointer to a RectangleInfo which defines the region of theimage to crop.






#

CloseImage

CFunction CloseImage closes a file associated with the image. If theHfilename prefix is '|', the file is a pipe and is closed with PipeClose.

(The format of the CloseImage routine is:



        CloseImage(image)


(A description of each parameter follows:




image:
)The address of a structure of type Image.






5

ColorFloodfillImage

IFunction ColorFloodfillImage floodfills the designated area with a color.DThe floodfill algorithm is strongly based on a similiar algorithm in#``Graphics Gems'' by Paul Heckbert.

1The format of the ColorFloodfillImage routine is:

8

        ColorFloodfillImage(image,x,y,xcolor,delta)


(A description of each parameter follows:




image:
)The address of a structure of type Image.



x,y:
?Unsigned integers representing the current location of the pen.



xcolor:
>A XColor structure. This is the RGB value of the target color.



delta:
4This is the allowed variance in color (fuzzy color).






)

ColorizeImage

KFunction ColorizeImage colorizes an image with the pen color. The amount of2the coloring is controled with the opacity levels.

+The format of the ColorizeImage routine is:

8

        ColorizeImage(image,opaque_color,pen_color)


(A description of each parameter follows:




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

$

opaque_color, pen_color:
4A character string that contain an X11 color string.






'

CommentImage

JFunction CommentImage initializes an image comment. Optionally the commentGcan include the image filename, type, width, height, or scene number by$embedding special format characters.

*The format of the CommentImage routine is:

)

        CommentImage(image,comments)


(A description of each parameter follows:




image:
)The address of a structure of type Image.



comments:
@The address of a character string containing the comment format.






/

CompressColormap

CFunction CompressColormap compresses an image colormap removing any#duplicate and unused color entries.

.The format of the CompressColormap routine is:

$

        CompressColormap(image)


(A description of each parameter follows:




image:
)The address of a structure of type Image.






+

CompositeImage

JFunction CompositeImage returns the second image composited onto the firstat the specified offsets.

,The format of the CompositeImage routine is:

L

        CompositeImage(image,compose,composite_image,x_offset,y_offset)


(A description of each parameter follows:




image:
)The address of a structure of type Image.



compose:
&Specifies an image composite operator.



composite_image:
)The address of a structure of type Image.



x_offset:
DAn integer that specifies the column offset of the composited image.



y_offset:
AAn integer that specifies the row offset of the composited image.






)

CondenseImage

CFunction CondenseImage compresses an image to the minimum number ofrunlength-encoded packets.

+The format of the CondenseImage routine is:

!

        CondenseImage(image)


(A description of each parameter follows:




image:
)The address of a structure of type Image.






)

ContrastImage

EFunction ContrastImage enhances the intensity differences between the)lighter and darker elements of the image.

+The format of the ContrastImage routine is:

)

        ContrastImage(image,sharpen)


(A description of each parameter follows:




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



sharpen:
>If True, the intensity is increased otherwise it is decreased.






#

CloneImage

HFunction CloneImage returns a copy of all fields of the input image. The?the pixel memory is allocated but the pixel data is not copied.

(The format of the CloneImage routine is:

D

        clone_image=CloneImage(image,columns,rows,clone_pixels)


(A description of each parameter follows:




clone_image:
HFunction CloneImage returns a pointer to the image after copying. A null0image is returned if there is a memory shortage.



image:
)The address of a structure of type Image.



columns:
DAn integer that specifies the number of columns in the copied image.



rows:
AAn integer that specifies the number of rows in the copied image.



clone_pixels:
ISpecifies whether the pixel data is copied. Must be either True or False;






!

CropImage

IFunction CropImage creates a new image that is a subregion of an existingFone. It allocates the memory necessary for the new Image structure andIreturns a pointer to the new image. This routine is optimized to perserveGthe runlength encoding. That is, the cropped image will always use lessmemory than the original.

'The format of the CropImage routine is:

5

        cropped_image=CropImage(image,crop_info)


(A description of each parameter follows:




cropped_image:
JFunction CropImage returns a pointer to the cropped image. A null image isKreturned if there is a a memory shortage or if the image width or height iszero.



image:
)The address of a structure of type Image.



crop_info:
FSpecifies a pointer to a RectangleInfo which defines the region of theimage to crop.






#

CycleImage

DFunction CycleColormapImage cycles the image colormap by a specifiedamount.

0The format of the CycleColormapImage routine is:

)

    CycleColormapImage(image,amount)


(A description of each parameter follows:




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



amount:
<An unsigned value that specifies the offset of the colormap.






)

DescribeImage

GFunction DescribeImage describes an image by printing its attributes tostderr.

+The format of the DescribeImage routine is:

.

        DescribeImage(image,file,verbose)


(A description of each parameter follows:




image:
)The address of a structure of type Image.



file:
'send the image attributes to this file.



verbose:
Gan unsigned value other than zero prints detailed information about theimage.






'

DestroyImage

BFunction DestroyImage deallocates memory associated with an image.

*The format of the DestroyImage routine is:

        DestroyImage(image)


(A description of each parameter follows:




image:
)The address of a structure of type Image.






/

DestroyImageInfo

IFunction DestroyImageInfo deallocates memory associated with an ImageInfo structure.

.The format of the DestroyImageInfo routine is:

)

        DestroyImageInfo(image_info)


(A description of each parameter follows:




image_info:
-Specifies a pointer to a ImageInfo structure.






)

DestroyImages

JFunction DestroyImages deallocates memory associated with a linked list ofimages.

+The format of the DestroyImages routine is:

!

        DestroyImages(image)


(A description of each parameter follows:




image:
)The address of a structure of type Image.






!

DrawImage

FFunction DrawImage draws a primitive (line, rectangle, ellipse) on theimage.

'The format of the DrawImage routine is:

+

        DrawImage(image,annotate_info)


(A description of each parameter follows:




image:
)The address of a structure of type Image.



annotate_info:
$The address of a DrawInfo structure.






)

EqualizeImage

GFunction EqualizeImage performs histogram equalization on the referenceimage.

+The format of the EqualizeImage routine is:

!

        EqualizeImage(image)


(A description of each parameter follows:




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






!

FlipImage

IFunction FlipImage creates a new image that reflects each scanline in theFvertical direction It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.

'The format of the FlipImage routine is:

+

        flipped_image=FlipImage(image)


(A description of each parameter follows:




flipped_image:
JFunction FlipImage returns a pointer to the image after reflecting. A null0image is returned if there is a memory shortage.



image:
)The address of a structure of type Image.






!

FlopImage

IFunction FlopImage creates a new image that reflects each scanline in theHhorizontal direction It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.

'The format of the FlopImage routine is:

+

        flopped_image=FlopImage(image)


(A description of each parameter follows:




flopped_image:
JFunction FlopImage returns a pointer to the image after reflecting. A null0image is returned if there is a memory shortage.



image:
)The address of a structure of type Image.






#

FrameImage

BFunction FrameImage takes an image and puts a frame around it of aEparticular color. It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.

(The format of the FrameImage routine is:

6

        framed_image=FrameImage(image,frame_info)


(A description of each parameter follows:




framed_image:
JFunction FrameImage returns a pointer to the framed image. A null image is)returned if there is a a memory shortage.



image:
)The address of a structure of type Image.



frame_info:
ESpecifies a pointer to a FrameInfo structure which defines the framedregion.






#

GammaImage

KFunction GammaImage converts the reference image to gamma corrected colors.

(The format of the GammaImage routine is:

$

        GammaImage(image,gamma)


(A description of each parameter follows:




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



gamma:
<A character string indicating the level of gamma correction.






-

GetAnnotateInfo

@Function GetAnnotateInfo initializes the AnnotateInfo structure.

-The format of the GetAnnotateInfo routine is:

+

        GetAnnotateInfo(annotate_info)


(A description of each parameter follows:




annotate_info:
0Specifies a pointer to a AnnotateInfo structure.






'

GetImageInfo

:Function GetImageInfo initializes the ImageInfo structure.

*The format of the GetImageInfo routine is:

%

        GetImageInfo(image_info)


(A description of each parameter follows:




image_info:
-Specifies a pointer to a ImageInfo structure.






#

IsGeometry

JFunction IsGeometry returns True if the geometry specification is valid asdetermined by XParseGeometry.

(The format of the IsGeometry routine is:

(

        status=IsGeometry(geometry)


(A description of each parameter follows:




status:
GFunction IsGeometry returns True if the geometry specification is validotherwise False is returned.



geometry:
*This string is the geometry specification.






%

IsGrayImage

KFunction IsGrayImage returns True if the image is grayscale otherwise FalseHis returned. If the image is DirectClass and grayscale, it is demoted to PseudoClass.

)The format of the IsGrayImage routine is:

&

        status=IsGrayImage(image)


(A description of each parameter follows:




status:
KFunction IsGrayImage returns True if the image is grayscale otherwise False is returned.



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






1

IsMonochromeImage

BFunction IsMonochromeImage returns True if the image is monochromeKotherwise False is returned. If the image is DirectClass and monochrome, itis demoted to PseudoClass.

/The format of the IsMonochromeImage routine is:

,

        status=IsMonochromeImage(image)


(A description of each parameter follows:




status:
BFunction IsMonochromeImage returns True if the image is monochromeotherwise False is returned.



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






#

IsSubimage

DFunction IsSubimage returns True if the geometry is a valid subimage)specification (e.g. [1], [1-9], [1,7,4]).

(The format of the IsSubimage routine is:

1

        status=IsSubimage(geometry,pedantic)


(A description of each parameter follows:




status:
DFunction IsSubimage returns True if the geometry is a valid subimage*specification otherwise False is returned.



geometry:
*This string is the geometry specification.



pedantic:
GA value other than 0 invokes a more restriction set of conditions for a-valid specification (e.g. [1], [1-4], [4-1]).






#

LabelImage

HFunction LabelImage initializes an image label. Optionally the label canCinclude the image filename, type, width, height, or scene number by$embedding special format characters.

(The format of the LabelImage routine is:

$

        LabelImage(image,label)


(A description of each parameter follows:




image:
)The address of a structure of type Image.



label:
>The address of a character string containing the label format.






/

ListToGroupImage

JFunction ListToGroupImage converts a linked list of images to a sequentialarray.

.The format of the ListToGroupImage routine is:

:

        images=ListToGroupImage(images,number_images)


(A description of each parameter follows:




images:
JFunction ListToGroupImage converts a linked list of images to a sequentialarray and returns the array..



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



number_images:
IA pointer to an unsigned integer. The number of images in the image arrayis returned here.






'

MagnifyImage

IFunction MagnifyImage creates a new image that is a integral size greaterIthan an existing one. It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.

EMagnifyImage scans the reference image to create a magnified image byDbilinear interpolation. The magnified image columns and rows become:

  number_columns << 1




  number_rows << 1


*The format of the MagnifyImage routine is:

0

        magnified_image=MagnifyImage(image)


(A description of each parameter follows:




magnified_image:
KFunction MagnifyImage returns a pointer to the image after magnification. A7null image is returned if there is a a memory shortage.



image:
)The address of a structure of type Image.






5

MatteFloodfillImage

HFunction MatteFloodfillImage floodfills the designated area with a matteKvalue. The floodfill algorithm is strongly based on a similiar algorithm in#``Graphics Gems'' by Paul Heckbert.

1The format of the MatteFloodfillImage routine is:

7

        MatteFloodfillImage(image,x,y,matte,delta)


(A description of each parameter follows:




image:
)The address of a structure of type Image.



x,y:
?Unsigned integers representing the current location of the pen.



matte:
8A integer value representing the amount of transparency.



delta:
4This is the allowed variance in color (fuzzy color).






%

MinifyImage

JFunction MinifyImage creates a new image that is a integral size less thanDan existing one. It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.

CMinifyImage scans the reference image to create a minified image byGcomputing the weighted average of a 4x4 cell centered at each referenceJpixel. The target pixel requires two columns and two rows of the reference=pixels. Therefore the minified image columns and rows become:



  number_columns/2




  number_rows/2


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 MinifyImage routine is:

.

        minified_image=MinifyImage(image)


(A description of each parameter follows:




minified_image:
JFunction MinifyImage returns a pointer to the image after reducing. A nullIimage is returned if there is a a memory shortage or if the image size isless than IconSize*2.



image:
)The address of a structure of type Image.






)

ModulateImage

JFunction ModulateImage modulates the hue, saturation, and brightness of animage.

+The format of the ModulateImage routine is:

*

        ModulateImage(image,modulate)


(A description of each parameter follows:




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



modulate:
HA character string indicating the percent change in hue, saturation, and brightness.






'

MogrifyImage

EFunction MogrifyImage applies image processing options to an image as#prescribed by command line options.

*The format of the MogrifyImage routine is:

5

        MogrifyImage(image_info,argc,argv,image)


(A description of each parameter follows:




image_info:
-Specifies a pointer to a ImageInfo structure.



argc:
JSpecifies a pointer to an integer describing the number of elements in theargument vector.



argv:
JSpecifies a pointer to a text array containing the command line arguments.



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






)

MogrifyImages

HFunction MogrifyImages applies image processing options to a sequence of-images as prescribed by command line options.

*The format of the MogrifyImage routine is:

7

        MogrifyImages(image_info,argc,argv,images)


(A description of each parameter follows:




image_info:
-Specifies a pointer to a ImageInfo structure.



argc:
JSpecifies a pointer to an integer describing the number of elements in theargument vector.



argv:
JSpecifies a pointer to a text array containing the command line arguments.



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






%

NegateImage

CFunction NegateImage negates the colors in the reference image. TheFGrayscale option means that only grayscale values within the image arenegated.

)The format of the NegateImage routine is:

)

        NegateImage(image,grayscale)


(A description of each parameter follows:




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






+

NormalizeImage

JFunction NormalizeImage normalizes the pixel values to span the full range:of color values. This is a contrast enhancement technique.

,The format of the NormalizeImage routine is:

"

        NormalizeImage(image)


(A description of each parameter follows:




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






%

OpagueImage

KFunction OpaqueImage changes the color of an opaque pixel to the pen color.

)The format of the OpaqueImage routine is:

2

    OpaqueImage(image,opaque_color,pen_color)


(A description of each parameter follows:




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

$

opaque_color, pen_color:
4A character string that contain an X11 color string.






!

OpenImage

HFunction OpenImage open a file associated with the image. A file name ofG'-' sets the file to stdin for type 'r' and stdout for type 'w'. If theHfilename suffix is '.gz' or '.Z', the image is decompressed for type 'r'Jand compressed for type 'w'. If the filename prefix is '|', it is piped toor from a system command.

'The format of the OpenImage routine is:

-

        OpenImage(image_info,image,type)


(A description of each parameter follows:




image_info:
-Specifies a pointer to a ImageInfo structure.



image:
)The address of a structure of type Image.



type:
!'r' for reading; 'w' for writing.






3

ParseImageGeometry

JFunction ParseImageGeometry parse a geometry specification and returns thewidth and height values.

0The format of the ParseImageGeometry routine is:

F

        flags=ParseImageGeometry(image_geometry,x,y,width,height)


(A description of each parameter follows:




flags:
IFunction ParseImageGeometry returns a bitmask that indicates which of theHfour values (width, height, xoffset, and yoffset) were actually found in8the string, and whether the x and y values are negative.



image_geometry:
ESpecifies a character string representing the geometry specification.



x,y:
IA pointer to an integer. The x and y offset as determined by the geometryspecification is returned here.



width,height:
KA pointer to an unsigned integer. The width and height as determined by the(geometry specification is returned here.






!

PingImage

JFunction PingImage returns the image size in bytes if it exists and can beJthe image is returned as well. Note, only the first image in a multi-frameimage file is pinged.

'The format of the PingImage routine is:

8

        filesize=PingImage(image_info,columns,rows)


(A description of each parameter follows:




filesize:
KFunction PingImage returns the image size in bytes if the image file exists*and it size can be determined otherwise 0.



image_info:
.Specifies a pointer to an ImageInfo structure.



columns:
GAn unsigned integer pointer that specifies the number of columns in theimage.



rows:
KAn unsigned integer pointer that specifies the number of rows in the image.






1

RGBTransformImage

FFunction RGBTransformImage converts the reference image from RGB to anFalternate colorspace. The transformation matrices are not the standardIones: the weights are rescaled to normalized the range of the transformedvalues to be [0..MaxRGB].

/The format of the RGBTransformImage routine is:

0

        RGBTransformImage(image,colorspace)


(A description of each parameter follows:




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



colorspace:
JAn unsigned integer value that indicates which colorspace to transform theimage.






!

RollImage

KFunction RollImage rolls an image vertically and horizontally. It allocatesIthe memory necessary for the new Image structure and returns a pointer tothe new image.

'The format of the RollImage routine is:

<

        rolled_image=RollImage(image,x_offset,y_offset)


(A description of each parameter follows:




rolled_image:
GFunction RollImage returns a pointer to the image after rolling. A null0image is returned if there is a memory shortage.



image:
)The address of a structure of type Image.



x_offset:
IAn integer that specifies the number of columns to roll in the horizontal direction.



y_offset:
DAn integer that specifies the number of rows to roll in the vertical direction.






%

SampleImage

DFunction SampleImage creates a new image that is a scaled size of anHexisting one using pixel sampling. It allocates the memory necessary for?the new Image structure and returns a pointer to the new image.

)The format of the SampleImage routine is:

:

        sampled_image=SampleImage(image,columns,rows)


(A description of each parameter follows:




sampled_image:
IFunction SampleImage returns a pointer to the image after scaling. A null0image is returned if there is a memory shortage.



image:
)The address of a structure of type Image.



columns:
EAn integer that specifies the number of columns in the sampled image.



rows:
BAn integer that specifies the number of rows in the sampled image.






#

ScaleImage

CFunction ScaleImage creates a new image that is a scaled size of anKexisting one. It allocates the memory necessary for the new Image structureIand returns a pointer to the new image. To scale a scanline from x pixelsJto y pixels, each new pixel represents x/y old pixels. To read x/y pixels,Hread (x/y rounded up) pixels but only count the required fraction of theJlast old pixel read in your new pixel. The remainder of the old pixel will!be counted in the next new pixel.

)The scaling algorithm was suggested by rjohnson@shell.com and is adapted from5pnmscale(1) of PBMPLUS by Jef Poskanzer.

(The format of the ScaleImage routine is:

8

        scaled_image=ScaleImage(image,columns,rows)


(A description of each parameter follows:




scaled_image:
HFunction ScaleImage returns a pointer to the image after scaling. A null0image is returned if there is a memory shortage.



image:
)The address of a structure of type Image.



columns:
DAn integer that specifies the number of columns in the scaled image.



rows:
AAn integer that specifies the number of rows in the scaled image.






'

SetImageInfo

EFunction SetImageInfo initializes the `magick' field of the ImageInfoEstructure. It is set to a type of image format based on the prefix orGsuffix of the filename. For example, `ps:image' returns PS indicating aFPostscript image. JPEG is returned for this filename: `image.jpg'. TheEfilename prefix has precedance over the suffix. Use an optional indexIenclosed in brackets after a file name to specify a desired subimage of aBmulti-resolution image format like Photo CD (e.g. img0001.pcd[4]).

*The format of the SetImageInfo routine is:

-

        SetImageInfo(image_info,rectify)


(A description of each parameter follows:




image_info:
-Specifies a pointer to a ImageInfo structure.



rectify:
Ian unsigned value other than zero rectifies the attribute for multi-frameHsupport (user may want multi-frame but image format may not support it).






-

SetNumberScenes

HFunction SetNumberScenes sets the number of scenes in an image sequence.

-The format of the SetNumberScenes routine is:

#

        SetNumberScenes(image)


(A description of each parameter follows:




image:
)The address of a structure of type Image.






?

SortColormapByIntentsity

JFunction SortColormapByIntensity sorts the colormap of a PseudoClass imageby decreasing color intensity.

5The format of the SortColormapByIntensity routine is:

'

    SortColormapByIntensity(image)


(A description of each parameter follows:




image:
A pointer to a Image structure.






%

StereoImage

IFunction StereoImage combines two images and produces a single image thatKis the composite of a left and right image of a stereo pair. The left imageGis converted to gray_scale and written to the red channel of the stereoIimage. The right image is converted to gray_scale and written to the blueKchannel of the stereo image. View the composite image with red-blue glassesto create a stereo effect.

)The format of the StereoImage routine is:

=

        stereo_image=StereoImage(left_image,right_image)


(A description of each parameter follows:




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



left_image:
)The address of a structure of type Image.



right_image:
)The address of a structure of type Image.






!

SyncImage

KFunction SyncImage initializes the red, green, and blue intensities of each'pixel as defined by the colormap index.

'The format of the SyncImage routine is:



        SyncImage(image)


(A description of each parameter follows:




image:
)The address of a structure of type Image.






'

TextureImage

GFunction TextureImage layers a texture onto the background of an image.

*The format of the TextureImage routine is:

)

        TextureImage(image,filename)


(A description of each parameter follows:




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



filename:
:This file contains the texture to layer on the background.






+

ThresholdImage

7Function ThresholdImage thresholds the reference image.

,The format of the ThresholdImage routine is:

,

        ThresholdImage(image,threshold)


(A description of each parameter follows:




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



threshold:
(A double indicating the threshold value.






+

TransformImage

IFunction TransformImage creates a new image that is a transformed size ofKof existing one as specified by the crop and image geometries. It allocatesIthe memory necessary for the new Image structure and returns a pointer tothe new image.

HIf a crop geometry is specified a subregion of the image is obtained. IfJthe specified image size, as defined by the image and scale geometries, isEsmaller than the actual image size, the image is first minified to anJintegral of the specified image size with an antialias digital filter. TheAimage is then scaled to the exact specified image size with pixelIreplication. If the specified image size is greater than the actual imageGsize, the image is first enlarged to an integral of the specified imageGsize with bilinear interpolation. The image is then scaled to the exact,specified image size with pixel replication.

,The format of the TransformImage routine is:

?

        TransformImage(image,crop_geometry,image_geometry)


(A description of each parameter follows:




image:
GThe address of an address of a structure of type Image. The transformed$image is returned as this parameter.



crop_geometry:
FSpecifies a pointer to a crop geometry string. This geometry defines asubregion of the image.



image_geometry:
GSpecifies a pointer to a image geometry string. The specified width and,height of this geometry string are absolute.






1

TransformRGBImage

IFunction TransformRGBImage converts the reference image from an alternateFcolorspace. The transformation matrices are not the standard ones: theIweights are rescaled to normalized the range of the transformed values tobe [0..MaxRGB].

/The format of the TransformRGBImage routine is:

0

        TransformRGBImage(image,colorspace)


(A description of each parameter follows:




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



colorspace:
DAn unsigned integer value that indicates the colorspace the image is<currently in. On return the image is in the RGB color space.






/

TransparentImage

JFunction TransparentImage creates a matte image associated with the image.KAll pixel locations are initially set to opaque. Any pixel that matches the'specified color are set to transparent.

.The format of the TransparentImage routine is:

*

        TransparentImage(image,color)


(A description of each parameter follows:




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



color:
4A character string that contain an X11 color string.






-

UncondenseImage

KFunction UncondenseImage uncompresses runlength-encoded pixels packets to arectangular array of pixels.

-The format of the UncondenseImage routine is:

*

        status=UncondenseImage(image)


(A description of each parameter follows:




status:
BFunction UncondenseImage returns True if the image is uncompressedotherwise False.



image:
)The address of a structure of type Image.






!

ZoomImage

KFunction ZoomImage creates a new image that is a scaled size of an existingFone. It allocates the memory necessary for the new Image structure andEreturns a pointer to the new image. The Point filter gives fast pixelKreplication, Triangle is equivalent to bi-linear interpolation, and Mitchel(giver slower, very high-quality results.

'The format of the ZoomImage routine is:

>

        zoomed_image=ZoomImage(image,columns,rows,filter)


(A description of each parameter follows:




zoomed_image:
GFunction ZoomImage returns a pointer to the image after scaling. A null0image is returned if there is a memory shortage.



image:
)The address of a structure of type Image.



columns:
DAn integer that specifies the number of columns in the zoomed image.



rows:
AAn integer that specifies the number of rows in the scaled image.



filter:
FThis is the filter type to used to zoom the image. It is an enumeratedvalue of type FilterType.