8transform - Methods to Transform an Image>/


NAME



)transform - Methods to Transform an Image






(

SYNOPSIS



`Image * ChopImage( Image *image, const RectangleInfo *chop_info );



FImage * CoalesceImages( Image *images );



`Image * CropImage( Image *image, const RectangleInfo *crop_info );



IImage * DeconstructImages( Image *images );



@Image * FlipImage( Image *image );



@Image * FlopImage( Image *image );



[Image * RollImage( Image *image, const int x_offset, const int y_offset );



\void TransformImage( Image ** image, const char *crop_geometry, const char*image_geometry );






B

FUNCTION DESCRIPTIONS






*

ChopImage



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



&The format of the ChopImage method is:

Á
Image *ChopImage ( Image *image, const RectangleInfo *chop_info );


=A description of each parameter follows:


<

chop_image:


6Method ChopImage returns a pointer to the chop image. KA null image is returned if there is a memory shortage(or if the image width or height is zero.

"

image:


)The address of a structure of type Image.

&

chop_info:


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






4

CoalesceImages



FMethod CoalesceImages merges a sequence of images. This is useful for GIF and YMNG animation sequences that have page offsets and disposal methods.



+The format of the CoalesceImages method is:

Image *CoalesceImages ( Image *images );


=A description of each parameter follows:


"

image:


EThe address of a structure of type Image; returned from ReadImage. It7points to the first image in the group to be coalesced.






*

CropImage



GMethod CropImage creates a new image that is a subregion of an existingFone. It allocates the memory necessary for the new Image structure andHreturns a pointer to the new image. This method is optimized to preserveKthe runlength encoding. That is, the crop image will always use less memorythan the original.



&The format of the CropImage method is:

Á
Image *CropImage ( Image *image, const RectangleInfo *crop_info );


=A description of each parameter follows:


'

crop_image:


6Method CropImage returns a pointer to the crop image. KA null image is returned if there is a memory shortage(or if the image width or height is zero.

"

image:


)The address of a structure of type Image.

&

crop_info:


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






:

DeconstructImages



kMethod DeconstructImages breaks down an image sequence into constituent parts. This is useful for creating GIF or -MNG animation sequences.



.The format of the DeconstructImages method is:

ƒ
Image *DeconstructImages ( Image *images );


=A description of each parameter follows:


#

images:


EThe address of a structure of type Image; returned from ReadImage. It;points to the first image in the group to be deconstructed.






*

FlipImage



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



&The format of the FlipImage method is:

z
Image *FlipImage ( Image *image );


=A description of each parameter follows:


'

flip_image:


BMethod FlipImage returns a pointer to the image after reflecting. BA null image is returned if there is a memory shortage.

"

image:


)The address of a structure of type Image.






*

FlopImage



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



&The format of the FlopImage method is:

z
Image *FlopImage ( Image *image );


=A description of each parameter follows:


'

flop_image:


BMethod FlopImage returns a pointer to the image after reflecting. BA null image is returned if there is a memory shortage.

"

image:


)The address of a structure of type Image.






*

RollImage



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



&The format of the RollImage method is:

¢
Image *RollImage ( Image *image, const int x_offset, const int y_offset );


=A description of each parameter follows:


'

roll_image:


?Method RollImage returns a pointer to the image after rolling. BA null image is returned if there is a memory shortage.

"

image:


)The address of a structure of type Image.

%

x_offset:


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

%

y_offset:


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






4

TransformImage



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



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



+The format of the TransformImage method is:

void TransformImage ( Image **image, const char *crop_geometry, const char *image_geometry );


=A description of each parameter follows:


"

image:


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

*

crop_geometry:


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

+

image_geometry:


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