8transform - Methods to Transform an Image9W




"NAME

0

transform - Methods to Transform an Image



2page index




&SYNOPSIS

Z

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

Y

Image * CoalesceImages( Image *image, ExceptionInfo *exception );

t

Image * CropImage( Image *image, const RectangleInfo *crop_info, ExceptionInfo *exception );

\

Image * DeconstructImages( Image *image, ExceptionInfo *exception );

T

Image * FlipImage( Image *image, ExceptionInfo *exception );

T

Image * FlopImage( Image *image, ExceptionInfo *exception );

|

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

v

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



2page index


$

FUNCTION *DESCRIPTIONS



*

ChopImage

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 method is:

Image *ChopImage ( Image *image, const RectangleInfo *chop_info );
%      ExceptionInfo *exception)


AA description of each parameter follows:


J

chop_image:

7Method ChopImage returns a pointer to the chop image. tA 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.

H

chop_info:

USpecifies a pointer to a RectangleInfo which defines the region of the image to crop.

H

exception:

0return any errors or warnings in this structure.



4

CoalesceImages

J

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

2

The format of the CoalesceImages method is:

Image *CoalesceImages ( Image *image, ExceptionInfo *exception );

AA description of each parameter follows:


"

image:

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

&

exception:

0return any errors or warnings in this structure.



*

CropImage

@

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 method is optimized to preserve the runlength encoding. That is, the crop image will always use less memory than the original.

-

The format of the CropImage method is:


Image *CropImage ( Image *image, const RectangleInfo *crop_info, ExceptionInfo *exception );

AA description of each parameter follows:


J

crop_image:

7Method CropImage returns a pointer to the crop image. tA 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.

H

crop_info:

USpecifies a pointer to a RectangleInfo which defines the region of the image to crop.

&

exception:

0return any errors or warnings in this structure.



:

DeconstructImages

o

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

5

The format of the DeconstructImages method is:

Image *DeconstructImages ( Image *image, ExceptionInfo *exception );

AA description of each parameter follows:


"

image:

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

&

exception:

0return any errors or warnings in this structure.



*

FlipImage

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 method is:

Image *FlipImage ( Image *image, ExceptionInfo *exception );

AA description of each parameter follows:


J

flip_image:

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

"

image:

)The address of a structure of type Image.

&

exception:

0return any errors or warnings in this structure.



*

FlopImage

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 method is:

Image *FlopImage ( Image *image, ExceptionInfo *exception );

AA description of each parameter follows:


J

flop_image:

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

"

image:

)The address of a structure of type Image.

&

exception:

0return any errors or warnings in this structure.



*

RollImage

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 method is:

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

AA description of each parameter follows:


J

roll_image:

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

"

image:

)The address of a structure of type Image.

F

x_offset:

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

F

y_offset:

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

&

exception:

0return any errors or warnings in this structure.



4

TransformImage

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.

x

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.

2

The format of the TransformImage method is:

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

AA description of each parameter follows:


"

image:

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

P

crop_geometry:

_Specifies a pointer to a crop geometry string. This geometry defines a subregion of the image.

R

image_geometry:

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

page index