NAME

image - ImageMagick Image Routines


SYNOPSIS

allocated_image=AllocateImage(image_info)

AnnotateImage(image,annotate_info)

AverageImages(images)

bordered_image=BorderImage(image,border_info)

chop_image=ChopImage(image,chop_info)

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

CloseImage(image)

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

ColorizeImage(image,opaque_color,pen_color)

CommentImage(image,comments)

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

CompressColormap(image)

CondenseImage(image)

ContrastImage(image,sharpen)

cropped_image=CropImage(image,crop_info)

DescribeImage(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)

status=IsMonochromeImage(image)

status=IsSubimage(geometry,pedantic)

LabelImage(image,label)

LayerImage(image,layer)

images=ListToGroupImage(images,number_images)

magnified_image=MagnifyImage(image)

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

minified_image=MinifyImage(image)

ModulateImage(image,modulate)

MogrifyImage(image_info,argc,argv,image)

MogrifyImages(image_info,argc,argv,images)

NegateImage(image,grayscale)

NormalizeImage(image)

OpenImage(image_info,image,type)

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

filesize=PingImage(image_info,columns,rows)

RGBTransformImage(image,colorspace)

rolled_image=RollImage(image,x_offset,y_offset)

sampled_image=SampleImage(image,columns,rows)

scaled_image=ScaleImage(image,columns,rows)

SetImageInfo(image_info,rectify)

SetNumberScenes(image)

stereo_image=StereoImage(left_image,right_image)

SyncImage(image)

TextureImage(image,filename)

ThresholdImage(image,threshold)

TransformImage(image,crop_geometry,image_geometry)

TransformRGBImage(image,colorspace)

TransparentImage(image,color)

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


FUNCTION DESCRIPTIONS


AllocateImage

Function AllocateImage allocates an Image structure and initializes each field to a default value.

The format of the AllocateImage routine is:

        allocated_image=AllocateImage(image_info)

A description of each parameter follows:

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

image_info:
Specifies a pointer to a ImageInfo structure.


AllocateNextImage

Function AllocateNextImage allocates an Image structure and initializes each 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

Function AnnotateImage annotates an image with test. Optionally the annotation 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

Function AverageImages averages a set of images. All the input images must be the same size in pixels.

The format of the AverageImage routine is:

        AverageImages(images)

A description of each parameter follows:

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


BorderImage

Function BorderImage takes an image and puts a border around it of a particular color. It allocates the memory necessary for the new Image structure 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:
Function 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:
Specifies a pointer to a XRectangle which defines the border region.


ChopImage

Function ChopImage creates a new image that is a subregion of an existing one. 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:

        chop_image=ChopImage(image,chop_info)

A description of each parameter follows:

chop_image:
Function ChopImage returns a pointer to the chop image. A null image is returned if there is a a memory shortage or if the image width or height is zero.

image:
The address of a structure of type Image.

chop_info:
Specifies a pointer to a RectangleInfo which defines the region of the image to crop.


CloseImage

Function CloseImage closes a file associated with the image. If the filename 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.


ColorFloodfillImage

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

The format of the ColorFloodfillImage routine is:

        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:
This is the allowed variance in color (fuzzy color).


ColorizeImage

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

The format of the ColorizeImage routine is:

        ColorizeImage(image,opaque_color,pen_color)

A description of each parameter follows:

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

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


CommentImage

Function CommentImage initializes an image comment. Optionally the comment can 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

Function 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

Function CompositeImage returns the second image composited onto the first at the specified offsets.

The format of the CompositeImage routine is:

        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:
An integer that specifies the column offset of the composited image.

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


CondenseImage

Function CondenseImage compresses an image to the minimum number of runlength-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

Function 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:
The address of a structure of type Image; returned from ReadImage.

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


CloneImage

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

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

A description of each parameter follows:

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

image:
The address of a structure of type Image.

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

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

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


CropImage

Function CropImage creates a new image that is a subregion of an existing one. It allocates the memory necessary for the new Image structure and returns a pointer to the new image. This routine is optimized to perserve the runlength encoding. That is, the cropped image will always use less memory than the original.

The format of the CropImage routine is:

        cropped_image=CropImage(image,crop_info)

A description of each parameter follows:

cropped_image:
Function CropImage returns a pointer to the cropped image. A null image is returned if there is a a memory shortage or if the image width or height is zero.

image:
The address of a structure of type Image.

crop_info:
Specifies a pointer to a RectangleInfo which defines the region of the image to crop.


CycleImage

Function CycleColormapImage cycles the image colormap by a specified amount.

The format of the CycleColormapImage routine is:

    CycleColormapImage(image,amount)

A description of each parameter follows:

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

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


DescribeImage

Function DescribeImage describes an image by printing its attributes to stderr.

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:
an unsigned value other than zero prints detailed information about the image.


DestroyImage

Function 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

Function 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

Function DestroyImages deallocates memory associated with a linked list of images.

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

Function DrawImage draws a primitive (line, rectangle, ellipse) on the image.

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

Function EqualizeImage performs histogram equalization on the reference image.

The format of the EqualizeImage routine is:

        EqualizeImage(image)

A description of each parameter follows:

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


FlipImage

Function FlipImage creates a new image that reflects each scanline in the vertical direction It allocates the memory necessary for the new Image structure 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:
Function FlipImage returns a pointer to the image after reflecting. A null image is returned if there is a memory shortage.

image:
The address of a structure of type Image.


FlopImage

Function FlopImage creates a new image that reflects each scanline in the horizontal direction It allocates the memory necessary for the new Image structure 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:
Function FlopImage returns a pointer to the image after reflecting. A null image is returned if there is a memory shortage.

image:
The address of a structure of type Image.


FrameImage

Function FrameImage takes an image and puts a frame around it of a particular color. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

The format of the FrameImage routine is:

        framed_image=FrameImage(image,frame_info)

A description of each parameter follows:

framed_image:
Function 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:
Specifies a pointer to a FrameInfo structure which defines the framed region.


GammaImage

Function 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:
The 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:

image_info:
Specifies a pointer to a ImageInfo structure.

annotate_info:
Specifies 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

Function IsGeometry returns True if the geometry specification is valid as determined by XParseGeometry.

The format of the IsGeometry routine is:

        status=IsGeometry(geometry)

A description of each parameter follows:

status:
Function IsGeometry returns True if the geometry specification is valid otherwise False is returned.

geometry:
This string is the geometry specification.


IsGrayImage

Function IsGrayImage returns True if the image is grayscale otherwise False is 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:
Function IsGrayImage returns True if the image is grayscale otherwise False is returned.

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


IsMonochromeImage

Function IsMonochromeImage returns True if the image is monochrome otherwise False is returned. If the image is DirectClass and monochrome, it is demoted to PseudoClass.

The format of the IsMonochromeImage routine is:

        status=IsMonochromeImage(image)

A description of each parameter follows:

status:
Function IsMonochromeImage returns True if the image is monochrome otherwise False is returned.

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


IsSubimage

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

        status=IsSubimage(geometry,pedantic)

A description of each parameter follows:

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

geometry:
This string is the geometry specification.

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


LabelImage

Function LabelImage initializes an image label. Optionally the label can include 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.


LayerImage

Function LayerImage extracts the specified layer from the references image.

The format of the LayerImage routine is:

        LayerImage(image,layer)

A description of each parameter follows:

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

layer:
A value of type LayerType that identifies which layer to extract.


ListToGroupImage

Function ListToGroupImage converts a linked list of images to a sequential array.

The format of the ListToGroupImage routine is:

        images=ListToGroupImage(images,number_images)

A description of each parameter follows:

images:
Function ListToGroupImage converts a linked list of images to a sequential array and returns the array..

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

number_images:
A pointer to an unsigned integer. The number of images in the image array is returned here.


MagnifyImage

Function MagnifyImage creates a new image that is a integral size greater than an existing one. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

MagnifyImage scans the reference image to create a magnified image by bilinear interpolation. The magnified image columns and rows become:

  number_columns << 1

  number_rows << 1

The format of the MagnifyImage routine is:

        magnified_image=MagnifyImage(image)

A description of each parameter follows:

magnified_image:
Function MagnifyImage returns a pointer to the image after magnification. A null image is returned if there is a a memory shortage.

image:
The address of a structure of type Image.


MatteFloodfillImage

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

The format of the MatteFloodfillImage routine is:

        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:
A integer value representing the amount of transparency.

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


MinifyImage

Function MinifyImage creates a new image that is a integral size less than an existing one. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

MinifyImage scans the reference image to create a minified image by computing the weighted average of a 4x4 cell centered at each reference pixel. 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

Weights assume that the importance of neighboring pixels is negately proportional to the square of their distance from the target pixel.

The scan only processes pixels that have a full set of neighbors. Pixels in the 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:
Function MinifyImage returns a pointer to the image after reducing. A null image is returned if there is a a memory shortage or if the image size is less than IconSize*2.

image:
The address of a structure of type Image.


ModulateImage

Function ModulateImage modulates the hue, saturation, and brightness of an image.

The format of the ModulateImage routine is:

        ModulateImage(image,modulate)

A description of each parameter follows:

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

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


MogrifyImage

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

The format of the MogrifyImage routine is:

        MogrifyImage(image_info,argc,argv,image)

A description of each parameter follows:

image_info:
Specifies a pointer to a ImageInfo structure.

argc:
Specifies a pointer to an integer describing the number of elements in the argument vector.

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

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


MogrifyImages

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

The format of the MogrifyImage routine is:

        MogrifyImages(image_info,argc,argv,images)

A description of each parameter follows:

image_info:
Specifies a pointer to a ImageInfo structure.

argc:
Specifies a pointer to an integer describing the number of elements in the argument vector.

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

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


NegateImage

Function NegateImage negates the colors in the reference image. The Grayscale option means that only grayscale values within the image are negated.

The format of the NegateImage routine is:

        NegateImage(image,grayscale)

A description of each parameter follows:

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


NormalizeImage

Function 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:
The address of a structure of type Image; returned from ReadImage.


OpagueImage

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

The format of the OpaqueImage routine is:

    OpaqueImage(image,opaque_color,pen_color)

A description of each parameter follows:

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

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


OpenImage

Function OpenImage open a file associated with the image. A file name of '-' sets the file to stdin for type 'r' and stdout for type 'w'. If the filename suffix is '.gz' or '.Z', the image is decompressed for type 'r' and compressed for type 'w'. If the filename prefix is '|', it is piped to or 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.


ParseImageGeometry

Function ParseImageGeometry parse a geometry specification and returns the width and height values.

The format of the ParseImageGeometry routine is:

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

A description of each parameter follows:

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

image_geometry:
Specifies a character string representing the geometry specification.

x,y:
A pointer to an integer. The x and y offset as determined by the geometry specification is returned here.

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


PingImage

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

The format of the PingImage routine is:

        filesize=PingImage(image_info,columns,rows)

A description of each parameter follows:

filesize:
Function 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:
An unsigned integer pointer that specifies the number of columns in the image.

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


RGBTransformImage

Function RGBTransformImage converts the reference image from RGB to an alternate colorspace. The transformation matrices are not the standard ones: the weights are rescaled to normalized the range of the transformed values to be [0..MaxRGB].

The format of the RGBTransformImage routine is:

        RGBTransformImage(image,colorspace)

A description of each parameter follows:

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

colorspace:
An unsigned integer value that indicates which colorspace to transform the image.


RollImage

Function RollImage rolls an image vertically and horizontally. It allocates the memory necessary for the new Image structure and returns a pointer to the 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:
Function RollImage returns a pointer to the image after rolling. A null image is returned if there is a memory shortage.

image:
The address of a structure of type Image.

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

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


SampleImage

Function SampleImage creates a new image that is a scaled size of an existing 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:
Function SampleImage returns a pointer to the image after scaling. A null image is returned if there is a memory shortage.

image:
The address of a structure of type Image.

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

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


ScaleImage

Function ScaleImage creates a new image that is a scaled size of an existing one. It allocates the memory necessary for the new Image structure and returns a pointer to the new image. To scale a scanline from x pixels to y pixels, each new pixel represents x/y old pixels. To read x/y pixels, read (x/y rounded up) pixels but only count the required fraction of the last 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 from pnmscale(1) of PBMPLUS by Jef Poskanzer.

The format of the ScaleImage routine is:

        scaled_image=ScaleImage(image,columns,rows)

A description of each parameter follows:

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

image:
The address of a structure of type Image.

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

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


SetImageInfo

Function SetImageInfo initializes the `magick' field of the ImageInfo structure. It is set to a type of image format based on the prefix or suffix of the filename. For example, `ps:image' returns PS indicating a Postscript image. JPEG is returned for this filename: `image.jpg'. The filename prefix has precedance over the suffix. Use an optional index enclosed in brackets after a file name to specify a desired subimage of a multi-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:
an unsigned value other than zero rectifies the attribute for multi-frame support (user may want multi-frame but image format may not support it).


SetNumberScenes

Function 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

Function SortColormapByIntensity sorts the colormap of a PseudoClass image by decreasing color intensity.

The format of the SortColormapByIntensity routine is:

    SortColormapByIntensity(image)

A description of each parameter follows:

image:
A pointer to a Image structure.


StereoImage

Function StereoImage combines two images and produces a single image that is the composite of a left and right image of a stereo pair. The left image is converted to gray_scale and written to the red channel of the stereo image. The right image is converted to gray_scale and written to the blue channel of the stereo image. View the composite image with red-blue glasses to 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:
Function 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

Function 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

Function 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:
The address of a structure of type Image; returned from ReadImage.

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


ThresholdImage

Function ThresholdImage thresholds the reference image.

The format of the ThresholdImage routine is:

        ThresholdImage(image,threshold)

A description of each parameter follows:

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

threshold:
A double indicating the threshold value.


TransformImage

Function TransformImage creates a new image that is a transformed size of of existing one as specified by the crop and image geometries. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

If a crop geometry is specified a subregion of the image is obtained. If the specified image size, as defined by the image and scale geometries, is smaller than the actual image size, the image is first minified to an integral of the specified image size with an antialias digital filter. The image is then scaled to the exact specified image size with pixel replication. If the specified image size is greater than the actual image size, the image is first enlarged to an integral of the specified image size 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:
The address of an address of a structure of type Image. The transformed image is returned as this parameter.

crop_geometry:
Specifies a pointer to a crop geometry string. This geometry defines a subregion of the image.

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


TransformRGBImage

Function TransformRGBImage converts the reference image from an alternate colorspace. The transformation matrices are not the standard ones: the weights are rescaled to normalized the range of the transformed values to be [0..MaxRGB].

The format of the TransformRGBImage routine is:

        TransformRGBImage(image,colorspace)

A description of each parameter follows:

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

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


TransparentImage

Function TransparentImage creates a matte image associated with the image. All 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:
The address of a structure of type Image; returned from ReadImage.

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


UncompressImage

Function UncondenseImage uncompresses runlength-encoded pixels packets to a rectangular array of pixels.

The format of the UncondenseImage routine is:

    status=UncondenseImage(image)

A description of each parameter follows:

status:
Function UncondenseImage returns True if the image is uncompressed otherwise False.

image:
The address of a structure of type Image.


ZoomImage

Function ZoomImage creates a new image that is a scaled size of an existing one. It allocates the memory necessary for the new Image structure and returns a pointer to the new image. The Point filter gives fast pixel replication, 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:
Function ZoomImage returns a pointer to the image after scaling. A null image is returned if there is a memory shortage.

image:
The address of a structure of type Image.

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

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

filter:
This is the filter type to used to zoom the image. It is an enumerated value of type FilterType.