image - ImageMagick Image Routines
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)
CompressImage(image)
ContrastImage(image,sharpen)
cropped_image=CropImage(image,crop_info)
DescribeImage(image,file,verbose)
DestroyImage(image)
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)
LabelImage(image,label)
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)
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,recify)
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)
status=UncompressImage(image)
zoomed_image=ZoomImage(image,columns,rows,filter)
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:
- o 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.
- o image_info:
-
Specifies a pointer to a ImageInfo structure.
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:
- o image_info:
-
Specifies a pointer to a ImageInfo structure.
- o image:
-
The address of a structure of type Image.
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:
- o image:
-
The address of a structure of type Image.
- o annotate_info:
-
The address of a AnnotateInfo structure.
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:
- o images:
-
The address of a structure of type Image; returned from ReadImage.
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:
- o bordered_image:
-
Function BorderImage returns a pointer to the bordered image. A null image
is returned if there is a a memory shortage.
- o image:
-
The address of a structure of type Image.
- o border_info:
-
Specifies a pointer to a XRectangle which defines the border region.
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:
- o 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.
- o image:
-
The address of a structure of type Image.
- o chop_info:
-
Specifies a pointer to a RectangleInfo which defines the region of the
image to crop.
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:
- o image:
-
The address of a structure of type Image.
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:
- o image:
-
The address of a structure of type Image.
- o x,y:
-
Unsigned integers representing the current location of the pen.
- o xcolor:
-
A XColor structure. This is the RGB value of the target color.
- o delta:
-
This is the allowed variance in color (fuzzy color).
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o opaque_color, pen_color:
-
A character string that contain an X11 color string.
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:
- o image:
-
The address of a structure of type Image.
- o comments:
-
The address of a character string containing the comment format.
Function CompressColormap compresses an image colormap removing any unused
color entries.
The format of the CompressColormap routine is:
CompressColormap(image)
A description of each parameter follows:
- o image:
-
The address of a structure of type Image.
Function CompressImage compresses an image to the minimum number of
runlength-encoded packets.
The format of the CompressImage routine is:
CompressImage(image)
A description of each parameter follows:
- o image:
-
The address of a structure of type Image.
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:
- o image:
-
The address of a structure of type Image.
- o compose:
-
Specifies an image composite operator.
- o composite_image:
-
The address of a structure of type Image.
- o x_offset:
-
An integer that specifies the column offset of the composited image.
- o y_offset:
-
An integer that specifies the row offset of the composited image.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o sharpen:
-
If True, the intensity is increased otherwise it is decreased.
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:
- o clone_image:
-
Function CloneImage returns a pointer to the image after copying. A null
image is returned if there is a memory shortage.
- o image:
-
The address of a structure of type Image.
- o columns:
-
An integer that specifies the number of columns in the copied image.
- o rows:
-
An integer that specifies the number of rows in the copied image.
- o clone_pixels:
-
Specifies whether the pixel data is copied. Must be either True or False;
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:
- o 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.
- o image:
-
The address of a structure of type Image.
- o crop_info:
-
Specifies a pointer to a RectangleInfo which defines the region of the
image to crop.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o amount:
-
An unsigned value that specifies the offset of the colormap.
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:
- o image:
-
The address of a structure of type Image.
- o file:
-
send the image attributes to this file.
- o verbose:
-
an unsigned value other than zero prints detailed information about the
image.
Function DestroyImage deallocates memory associated with an image.
The format of the DestroyImage routine is:
DestroyImage(image)
A description of each parameter follows:
- o image:
-
The address of a structure of type Image.
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:
- o image:
-
The address of a structure of type Image.
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:
- o image:
-
The address of a structure of type Image.
- o annotate_info:
-
The address of a DrawInfo structure.
Function EqualizeImage performs histogram equalization on the reference
image.
The format of the EqualizeImage routine is:
EqualizeImage(image)
A description of each parameter follows:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
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:
- o flipped_image:
-
Function FlipImage returns a pointer to the image after reflecting. A null
image is returned if there is a memory shortage.
- o image:
-
The address of a structure of type Image.
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:
- o flopped_image:
-
Function FlopImage returns a pointer to the image after reflecting. A null
image is returned if there is a memory shortage.
- o image:
-
The address of a structure of type Image.
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:
- o framed_image:
-
Function FrameImage returns a pointer to the framed image. A null image is
returned if there is a a memory shortage.
- o image:
-
The address of a structure of type Image.
- o frame_info:
-
Specifies a pointer to a FrameInfo structure which defines the framed
region.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o gamma:
-
A character string indicating the level of gamma correction.
Function GetAnnotateInfo initializes the AnnotateInfo structure.
The format of the GetAnnotateInfo routine is:
GetAnnotateInfo(annotate_info)
A description of each parameter follows:
- o annotate_info:
-
Specifies a pointer to a AnnotateInfo structure.
Function GetImageInfo initializes the ImageInfo structure.
The format of the GetImageInfo routine is:
GetImageInfo(image_info)
A description of each parameter follows:
- o image_info:
-
Specifies a pointer to a ImageInfo structure.
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:
- o status:
-
Function IsGeometry returns True if the image is gray_scale otherwise False
is returned.
- o geometry:
-
This string is the geometry specification.
Function IsGrayImage returns True if the image is gray_scale otherwise
False is returned. If the image is DirectClass and gray_scale, it is
demoted to PseudoClass.
The format of the IsGrayImage routine is:
status=IsGrayImage(image)
A description of each parameter follows:
- o status:
-
Function IsGrayImage returns True if the image is gray_scale otherwise
False is returned.
- o image:
-
The address of a structure of type Image; returned from ReadImage.
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:
- o image:
-
The address of a structure of type Image.
- o label:
-
The address of a character string containing the label format.
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:
- o images:
-
Function ListToGroupImage converts a linked list of images to a sequential
array and returns the array..
- o images:
-
The address of a structure of type Image; returned from ReadImage.
- o number_images:
-
A pointer to an unsigned integer. The number of images in the image array
is returned here.
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:
- o magnified_image:
-
Function MagnifyImage returns a pointer to the image after magnification. A
null image is returned if there is a a memory shortage.
- o image:
-
The address of a structure of type Image.
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:
- o image:
-
The address of a structure of type Image.
- o x,y:
-
Unsigned integers representing the current location of the pen.
- o matte:
-
A integer value representing the amount of transparency.
- o delta:
-
This is the allowed variance in color (fuzzy color).
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:
- o 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.
- o image:
-
The address of a structure of type Image.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o modulate:
-
A character string indicating the percent change in hue, saturation, and
brightness.
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:
- o image_info:
-
Specifies a pointer to a ImageInfo structure.
- o argc:
-
Specifies a pointer to an integer describing the number of elements in the
argument vector.
- o argv:
-
Specifies a pointer to a text array containing the command line arguments.
- o image:
-
The address of a structure of type Image; returned from ReadImage.
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:
- o image_info:
-
Specifies a pointer to a ImageInfo structure.
- o argc:
-
Specifies a pointer to an integer describing the number of elements in the
argument vector.
- o argv:
-
Specifies a pointer to a text array containing the command line arguments.
- o images:
-
The address of a structure of type Image; returned from ReadImage.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o opaque_color, pen_color:
-
A character string that contain an X11 color string.
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:
- o image_info:
-
Specifies a pointer to a ImageInfo structure.
- o image:
-
The address of a structure of type Image.
- o type:
-
'r' for reading; 'w' for writing.
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:
- o 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.
- o image_geometry:
-
Specifies a character string representing the geometry specification.
- o x,y:
-
A pointer to an integer. The x and y offset as determined by the geometry
specification is returned here.
- o width,height:
-
A pointer to an unsigned integer. The width and height as determined by the
geometry specification is returned here.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o colorspace:
-
An unsigned integer value that indicates which colorspace to transform the
image.
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:
- o rolled_image:
-
Function RollImage returns a pointer to the image after rolling. A null
image is returned if there is a memory shortage.
- o image:
-
The address of a structure of type Image.
- o x_offset:
-
An integer that specifies the number of columns to roll in the horizontal
direction.
- o y_offset:
-
An integer that specifies the number of rows to roll in the vertical
direction.
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:
- o sampled_image:
-
Function SampleImage returns a pointer to the image after scaling. A null
image is returned if there is a memory shortage.
- o image:
-
The address of a structure of type Image.
- o columns:
-
An integer that specifies the number of columns in the sampled image.
- o rows:
-
An integer that specifies the number of rows in the sampled image.
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:
- o scaled_image:
-
Function ScaleImage returns a pointer to the image after scaling. A null
image is returned if there is a memory shortage.
- o image:
-
The address of a structure of type Image.
- o columns:
-
An integer that specifies the number of columns in the scaled image.
- o rows:
-
An integer that specifies the number of rows in the scaled image.
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,recify)
A description of each parameter follows:
- o image_info:
-
Specifies a pointer to a ImageInfo structure.
- o 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).
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:
- o image:
-
The address of a structure of type Image.
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:
- o image:
-
A pointer to a Image structure.
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:
- o stereo_image:
-
Function StereoImage returns a pointer to the stereo image. A null image is
returned if there is a memory shortage.
- o left_image:
-
The address of a structure of type Image.
- o right_image:
-
The address of a structure of type Image.
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:
- o image:
-
The address of a structure of type Image.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o filename:
-
This file contains the texture to layer on the background.
Function ThresholdImage thresholds the reference image.
The format of the ThresholdImage routine is:
ThresholdImage(image,threshold)
A description of each parameter follows:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o threshold:
-
A double indicating the threshold value.
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:
- o image:
-
The address of an address of a structure of type Image. The transformed
image is returned as this parameter.
- o crop_geometry:
-
Specifies a pointer to a crop geometry string. This geometry defines a
subregion of the image.
- o image_geometry:
-
Specifies a pointer to a image geometry string. The specified width and
height of this geometry string are absolute.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o colorspace:
-
An unsigned integer value that indicates the colorspace the image is
currently in. On return the image is in the RGB color space.
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:
- o image:
-
The address of a structure of type Image; returned from ReadImage.
- o color:
-
A character string that contain an X11 color string.
Function UncompressImage uncompresses runlength-encoded pixels packets to a
rectangular array of pixels.
The format of the UncompressImage routine is:
status=UncompressImage(image)
A description of each parameter follows:
- o status:
-
Function UncompressImage returns True if the image is uncompressed
otherwise False.
- o image:
-
The address of a structure of type Image.
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:
- o zoomed_image:
-
Function ZoomImage returns a pointer to the image after scaling. A null
image is returned if there is a memory shortage.
- o image:
-
The address of a structure of type Image.
- o columns:
-
An integer that specifies the number of columns in the zoomed image.
- o rows:
-
An integer that specifies the number of rows in the scaled image.
- o filter:
-
This unsigned integer is the filter type to used to zoom the image.