m+I8transform - Methods to Transform an Image>j Pair








NAME

0

transform - Methods to Transform an Image






(

SYNOPSIS

`

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

_

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

y

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

b

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

]

Image * FlattenImage( const Image *image, ExceptionInfo *exception );

Z

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

Z

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

]

Image * MosaicImages( const Image *image, ExceptionInfo *exception );

œ

unsigned int ProfileImage( Image *image, const char *name, const unsigned char *profile, const size_t length, unsigned int clone );

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

|

Image * ShaveImage( const Image *image, const RectangleInfo *shave_info, ExceptionInfo *exception );

v

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






B

FUNCTION DESCRIPTIONS





*

ChopImage

n

Chop() removes a region of an image and collapses the image to occupy the removed portion.

-

The format of the ChopImage method is:

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

A description of each parameter follows:


A
o image:


The image.


I
o chop_info:


'Define the region of the image to chop.


I
o exception:


0Return any errors or warnings in this structure.





4

CoalesceImages

Ñ
CoalesceImages() composites a set of images while respecting any page offsets and disposal methods. GIF, MIFF, and MNG animation sequences typically start with an image background and each subsequent image varies in size and offset. CoalesceImages ( ) returns a new sequence where each image in the sequence is the same size as the first and composited with the next image in the sequence.

The format of the CoalesceImages method is:

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

A description of each parameter follows:


#
o image:


The image sequence.


'
o exception:


0Return any errors or warnings in this structure.





*

CropImage

£
Use CropImage() to extract a region of the image starting at the offset defined by geometry.

The format of the CropImage method is:

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

A description of each parameter follows:


#
o image:


The image.


G
o geometry:


LDefine the region of the image to crop with members x, y, width, and height.


'
o exception:


0Return any errors or warnings in this structure.





:

DeconstructImages

á
DeconstructImages() compares each image with the next in a sequence and returns the maximum bounding region of any pixel differences it discovers.

The format of the DeconstructImages method is:

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

A description of each parameter follows:


#
o image:


The image.


'
o exception:


0Return any errors or warnings in this structure.





0

FlattenImage

{

Method FlattenImage merges a sequence of images. This is useful for combining Photoshop layers into a single image.

0

The format of the FlattenImage method is:

ó
Image *FlattenImage ( const Image *image, ExceptionInfo *exception );

A description of each parameter follows:


#
o image:


The image sequence.


'
o exception:


0Return any errors or warnings in this structure.





*

FlipImage

¦
FlipImage() creates a vertical mirror image by reflecting the pixels around the central x-axis.

The format of the FlipImage method is:

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

A description of each parameter follows:


#
o image:


The image.


'
o exception:


0Return any errors or warnings in this structure.





*

FlopImage

¨
FlopImage() creates a horizontal mirror image by reflecting the pixels around the central y-axis.

The format of the FlopImage method is:

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

A description of each parameter follows:


#
o image:


The image.


'
o exception:


0Return any errors or warnings in this structure.





0

MosaicImages


MosaicImages() inlays an image sequence to form a single coherent picture. It returns a single image with each image in the sequence composited at the location defined by the page member of the image structure.

The format of the MosaicImage method is:

ó
Image *MosaicImages ( const Image *image, ExceptionInfo *exception );

A description of each parameter follows:


#
o image:


The image.


'
o exception:


0Return any errors or warnings in this structure.





0

ProfileImage

¸
ProfileImage() adds or removes a ICM, IPTC, or generic profile from an image. If the profile is NULL, it is removed from the image otherwise added. Use a name of ' *' and a profile of NULL to remove all profiles from the image. Ownership of the profile is transferred to ImageMagick ( it should not be altered or deallocated ) unless the clone option is set to True.

The format of the ProfileImage method is:

ì
unsigned int ProfileImage ( Image *image, const char *name, const unsigned char *profile, const size_t length, unsigned int clone );

A description of each parameter follows:


#
o image:


The image.


?
o name:


@Name of profile to add or remove: ICM, IPTC, or generic profile.


E
o profile:


The profile.


C
o length:


The length of the profile.


A
o clone:


FIf set True, then copy the profile rather than taking ownership of it.





*

RollImage

ˆ
RollImage() offsets an image as defined by x_offset and y_offset.

The format of the RollImage method is:


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

A description of each parameter follows:


#
o image:


The image.


G
o x_offset:


:The number of columns to roll in the horizontal direction.


G
o y_offset:


5The number of rows to roll in the vertical direction.


'
o exception:


0Return any errors or warnings in this structure.





,

ShaveImage

£

Method ShaveImage shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

.

The format of the ShaveImage method is:

9
Image *ShaveImage ( const Image *image, const RectangleInfo *shave_info, ExceptionInfo *exception );

A description of each parameter follows:


M
o shave_image:


™Method ShaveImage returns a pointer to the shaved image. A null image is returned if there is a memory shortage or if the image width or height is zero.


#
o image:


The image.


K
o shave_info:


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


'
o exception:


0Return any errors or warnings in this structure.





4

TransformImage

:
TransformImage() is a convenience method that behaves like ResizeImage ( ) or CropImage ( ) but accepts scaling and/or cropping information as a region geometry specification. If the operation fails, the original image handle is returned.

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:


#
o image:


>The image The transformed image is returned as this parameter.


Q
o crop_geometry:


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


S
o image_geometry:


MAn image geometry string. This geometry defines the final size of the image.