image - ImageMagick Image Routines
allocated_image=AllocateImage(image_info)
AnnotateImage(image,annotate_info)
AppendImages(images,stack)
averaged_image=AverageImages(images)
BlackImage(image)
bordered_image=BorderImage(image,border_info)
chop_image=ChopImage(image,chop_info)
clone_image=CloneImage(image,columns,rows,clone_pixels)
CloseImage(image)
ColorFloodfillImage(image,target,color,x,y,method)
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)
status=IsTainted(image)
LabelImage(image,label)
LayerImage(image,layer)
images=ListToGroupImage(images,number_images)
magnified_image=MagnifyImage(image)
MatteFloodfillImage(image,target,matte,x,y,method)
minified_image=MinifyImage(image)
ModulateImage(image,modulate)
MogrifyImage(image_info,argc,argv,image)
MogrifyImages(image_info,argc,argv,images)
morphed_image=MorphImages(images,number_frames)
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)
stegano_image=SteganoImage(image,watermark)
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)
Method 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:
Method AllocateImage returns a pointer to an image structure initialized to default values. A null image is returned if there is a memory shortage.
Specifies a pointer to a ImageInfo structure.
Method 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:
Specifies a pointer to a ImageInfo structure.
The address of a structure of type Image.
Method AnnotateImage annotates an image with text. 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:
The address of a structure of type Image.
The address of a AnnotateInfo structure.
Method AppendImages appends a set of images. All the input images must have the same width or height. Images of the same width are stacked top-to-bottom. Images of the same height are stacked left-to-right. If the stack is false, rectangular images are stacked left-to-right otherwise top-to-bottom.
The format of the AppendImage routine is:
AppendImages(images,stack)
A description of each parameter follows:
The address of a structure of type Image; returned from ReadImage.
An unsigned value other than stacks rectangular images top-to-bottom otherwise left-to-right.
Method AverageImages averages a set of images. All the input images must be the same size in pixels.
The format of the AverageImage routine is:
averaged_image=AverageImages(images)
A description of each parameter follows:
Method AverageImages returns the mean pixel value for an image sequence.
The address of a structure of type Image; returned from ReadImage.
Method BlackImage initializes the reference image to all black pixels.
The format of the BlackImage routine is:
BlackImage(image)
A description of each parameter follows:
The address of a structure of type Image; returned from ReadImage.
Method 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:
Method BorderImage returns a pointer to the bordered image. A null image is returned if there is a a memory shortage.
The address of a structure of type Image.
Specifies a pointer to a XRectangle which defines the border region.
Method 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:
Method 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.
The address of a structure of type Image.
Specifies a pointer to a RectangleInfo which defines the region of the image to crop.
Method 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:
The address of a structure of type Image.
Method CoalesceImages merges a sequence of images. This is useful for GIF animation sequences that have page offsets and disposal methods.
The format of the CoalesceImages routine is:
CoalesceImages(image)
A description of each parameter follows:
The address of a structure of type Image; returned from ReadImage.
Method 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,target,color,x,y,method)
A description of each parameter follows:
The address of a structure of type Image.
A RunlengthPacket structure. This is the RGB value of the target color.
A ColorPacket structure. This is the RGB value of the replacement color.
Unsigned integers representing the current location of the pen.
drawing method of type PrimitiveType: floodfill or fill to border.
Method 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:
The address of a structure of type Image; returned from ReadImage.
A character string that contain an X11 color string.
Method 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:
The address of a structure of type Image.
The address of a character string containing the comment format.
Method 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:
The address of a structure of type Image.
Method 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:
The address of a structure of type Image.
Specifies an image composite operator.
The address of a structure of type Image.
An integer that specifies the column offset of the composited image.
An integer that specifies the row offset of the composited image.
Method 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:
The address of a structure of type Image.
Method 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:
The address of a structure of type Image; returned from ReadImage.
If True, the intensity is increased otherwise it is decreased.
Method 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:
Method CloneImage returns a pointer to the image after copying. A null image is returned if there is a memory shortage.
The address of a structure of type Image.
An integer that specifies the number of columns in the copied image.
An integer that specifies the number of rows in the copied image.
Specifies whether the pixel data is copied. Must be either True or False;
Method 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:
Method 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.
The address of a structure of type Image.
Specifies a pointer to a RectangleInfo which defines the region of the image to crop.
Method 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:
The address of a structure of type Image; returned from ReadImage.
An unsigned value that specifies the offset of the colormap.
Method DescribeImage describes an image by printing its attributes to stdout.
The format of the DescribeImage routine is:
DescribeImage(image,file,verbose)
A description of each parameter follows:
The address of a structure of type Image.
send the image attributes to this file.
an unsigned value other than zero prints detailed information about the image.
Method DestroyImage deallocates memory associated with an image.
The format of the DestroyImage routine is:
DestroyImage(image)
A description of each parameter follows:
The address of a structure of type Image.
Method DestroyImageInfo deallocates memory associated with an ImageInfo structure.
The format of the DestroyImageInfo routine is:
DestroyImageInfo(image_info)
A description of each parameter follows:
Specifies a pointer to a ImageInfo structure.
Method 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:
The address of a structure of type Image.
Method 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:
The address of a structure of type Image.
The address of a DrawInfo structure.
Method EqualizeImage performs histogram equalization on the reference image.
The format of the EqualizeImage routine is:
EqualizeImage(image)
A description of each parameter follows:
The address of a structure of type Image; returned from ReadImage.
Method 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:
Method FlipImage returns a pointer to the image after reflecting. A null image is returned if there is a memory shortage.
The address of a structure of type Image.
Method 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:
Method FlopImage returns a pointer to the image after reflecting. A null image is returned if there is a memory shortage.
The address of a structure of type Image.
Method 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:
Method FrameImage returns a pointer to the framed image. A null image is returned if there is a a memory shortage.
The address of a structure of type Image.
Specifies a pointer to a FrameInfo structure which defines the framed region.
Method 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:
The address of a structure of type Image; returned from ReadImage.
A character string indicating the level of gamma correction.
Method GetAnnotateInfo initializes the AnnotateInfo structure.
The format of the GetAnnotateInfo routine is:
GetAnnotateInfo(annotate_info)
A description of each parameter follows:
Specifies a pointer to a ImageInfo structure.
Specifies a pointer to a AnnotateInfo structure.
Method GetImageInfo initializes the ImageInfo structure.
The format of the GetImageInfo routine is:
GetImageInfo(image_info)
A description of each parameter follows:
Specifies a pointer to a ImageInfo structure.
Method 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:
Method IsGeometry returns True if the geometry specification is valid otherwise False is returned.
This string is the geometry specification.
Method 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:
Method IsGrayImage returns True if the image is grayscale otherwise False is returned.
The address of a structure of type Image; returned from ReadImage.
Method 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:
Method IsMonochromeImage returns True if the image is monochrome otherwise False is returned.
The address of a structure of type Image; returned from ReadImage.
Method 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:
Method IsSubimage returns True if the geometry is a valid subimage specification otherwise False is returned.
This string is the geometry specification.
A value other than 0 invokes a more restriction set of conditions for a valid specification (e.g. [1], [1-4], [4-1]).
Method IsTainted returns True if the image has been altered since it was first read or if any image in the sequence has a difference magic or filename.
The format of the IsTainted routine is:
status=IsTainted(image)
A description of each parameter follows:
Method IsTainted returns True if the image has been altered since it was first read.
The address of a structure of type Image.
Method 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:
The address of a structure of type Image.
The address of a character string containing the label format.
Method 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:
The address of a structure of type Image; returned from ReadImage.
A value of type LayerType that identifies which layer to extract.
Method 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:
Method ListToGroupImage converts a linked list of images to a sequential array and returns the array..
The address of a structure of type Image; returned from ReadImage.
A pointer to an unsigned integer. The number of images in the image array is returned here.
Method 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:
Method MagnifyImage returns a pointer to the image after magnification. A null image is returned if there is a a memory shortage.
The address of a structure of type Image.
Method 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,target,matte,x,y,method)
A description of each parameter follows:
The address of a structure of type Image.
A RunlengthPacket structure. This is the RGB value of the target color.
A integer value representing the amount of transparency.
Unsigned integers representing the current location of the pen.
drawing method of type PrimitiveType: floodfill or fill to border.
Method 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:
Method 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.
The address of a structure of type Image.
Method 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:
The address of a structure of type Image; returned from ReadImage.
A character string indicating the percent change in hue, saturation, and brightness.
Method 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:
Specifies a pointer to a ImageInfo structure.
Specifies a pointer to an integer describing the number of elements in the argument vector.
Specifies a pointer to a text array containing the command line arguments.
The address of a structure of type Image; returned from ReadImage.
Method 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:
Specifies a pointer to a ImageInfo structure.
Specifies a pointer to an integer describing the number of elements in the argument vector.
Specifies a pointer to a text array containing the command line arguments.
The address of a structure of type Image; returned from ReadImage.
Method MorphImages morphs a set of images. both the image pixels and size are linearly interpolated to give the appearance of a meta-morphosis from one image to the next.
The format of the MorphImage routine is:
morphed_image=MorphImages(images,number_frames)
A description of each parameter follows:
Method MorphImages returns an image sequence that has linearly interpolated pixels and size between two input images.
The address of a structure of type Image; returned from ReadImage.
This unsigned integer reflects the number of in-between images to generate. The more in-between frames, the smoother the morph.
Method 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:
The address of a structure of type Image; returned from ReadImage.
Method 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:
The address of a structure of type Image; returned from ReadImage.
Method 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:
The address of a structure of type Image; returned from ReadImage.
A character string that contain an X11 color string.
Method 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:
Specifies a pointer to a ImageInfo structure.
The address of a structure of type Image.
'r' for reading; 'w' for writing.
Method 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:
Method 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.
Specifies a character string representing the geometry specification.
A pointer to an integer. The x and y offset as determined by the geometry specification is returned here.
A pointer to an unsigned integer. The width and height as determined by the geometry specification is returned here.
Method 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:
Method PingImage returns the image size in bytes if the image file exists and it size can be determined otherwise 0.
Specifies a pointer to an ImageInfo structure.
An unsigned integer pointer that specifies the number of columns in the image.
An unsigned integer pointer that specifies the number of rows in the image.
Method 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:
The address of a structure of type Image; returned from ReadImage.
An unsigned integer value that indicates which colorspace to transform the image.
Method 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:
Method RollImage returns a pointer to the image after rolling. A null image is returned if there is a memory shortage.
The address of a structure of type Image.
An integer that specifies the number of columns to roll in the horizontal direction.
An integer that specifies the number of rows to roll in the vertical direction.
Method 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:
Method SampleImage returns a pointer to the image after scaling. A null image is returned if there is a memory shortage.
The address of a structure of type Image.
An integer that specifies the number of columns in the sampled image.
An integer that specifies the number of rows in the sampled image.
Method 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:
Method ScaleImage returns a pointer to the image after scaling. A null image is returned if there is a memory shortage.
The address of a structure of type Image.
An integer that specifies the number of columns in the scaled image.
An integer that specifies the number of rows in the scaled image.
Method 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:
Specifies a pointer to a ImageInfo structure.
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).
Method 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:
The address of a structure of type Image.
Method 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:
A pointer to a Image structure.
Method SteganoImage hides a digital watermark within the image.
The format of the SteganoImage routine is:
stegano_image=SteganoImage(image,watermark)
A description of each parameter follows:
Method SteganoImage returns a pointer to the steganographic image with the watermark hidden. A null image is returned if there is a memory shortage.
The address of a structure of type Image.
The address of a structure of type Image.
Method 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:
Method StereoImage returns a pointer to the stereo image. A null image is returned if there is a memory shortage.
The address of a structure of type Image.
The address of a structure of type Image.
Method 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:
The address of a structure of type Image.
Method 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:
The address of a structure of type Image; returned from ReadImage.
This file contains the texture to layer on the background.
Method ThresholdImage thresholds the reference image.
The format of the ThresholdImage routine is:
ThresholdImage(image,threshold)
A description of each parameter follows:
The address of a structure of type Image; returned from ReadImage.
A double indicating the threshold value.
Method 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:
The address of an address of a structure of type Image. The transformed image is returned as this parameter.
Specifies a pointer to a crop geometry string. This geometry defines a subregion of the image.
Specifies a pointer to a image geometry string. The specified width and height of this geometry string are absolute.
Method 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:
The address of a structure of type Image; returned from ReadImage.
An unsigned integer value that indicates the colorspace the image is currently in. On return the image is in the RGB color space.
Method 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:
The address of a structure of type Image; returned from ReadImage.
A character string that contain an X11 color string.
Method 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:
Method UncondenseImage returns True if the image is uncompressed otherwise False.
The address of a structure of type Image.
Method 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. See Graphic Gems III for details on this algorithm.
The format of the ZoomImage routine is:
zoomed_image=ZoomImage(image,columns,rows)
A description of each parameter follows:
Method ZoomImage returns a pointer to the image after scaling. A null image is returned if there is a memory shortage.
The address of a structure of type Image.
An integer that specifies the number of columns in the zoomed image.
An integer that specifies the number of rows in the scaled image.