m+I2resize - Methods to Resize an Image>j Pair








NAME

*

resize - Methods to Resize an Image






(

SYNOPSIS

]

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

\

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

º

Image * ResizeImage( Image *image, const unsigned long columns, const unsigned long rows, const FilterTypes filter, const double blur, ExceptionInfo *exception );

Image * SampleImage( const Image *image, const unsigned long columns, const unsigned long rows, ExceptionInfo *exception );

Image * ScaleImage( const Image *image, const unsigned long columns, const unsigned long rows, ExceptionInfo *exception );






B

FUNCTION DESCRIPTIONS





0

MagnifyImage

§
MagnifyImage() is a convenience method that scales an image proportionally to twice its size.

The format of the MagnifyImage method is:

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

A description of each parameter follows:


A
o image:


The image.


I
o exception:


0Return any errors or warnings in this structure.





.

MinifyImage

¤
MinifyImage() is a convenience method that scales an image proportionally to half its size.

The format of the MinifyImage method is:

ò
Image *MinifyImage ( 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.





.

ResizeImage

q
ResizeImage() scales an image to the desired dimensions with one of these filters:
  Bessel   Blackman   Box  Catrom   Cubic      Gaussian  Hanning  Hermite    Lanczos   Mitchell Point      Quandratic  Sinc     Triangle
Ô

Most of the filters are FIR (finite impulse response), however, Bessel, Gaussian, and Sinc are IIR (infinite impulse response). Bessel and Sinc are windowed (brought down to zero) with the Blackman filter.

ResizeImage() was inspired by Paul Heckbert's zoom program.

The format of the ResizeImage method is:

‚
Image *ResizeImage ( Image *image, const unsigned long columns, const unsigned long rows, const FilterTypes filter, const double blur, ExceptionInfo *exception );

A description of each parameter follows:


#
o image:


The image.


E
o columns:


*The number of columns in the scaled image.


?
o rows:


'The number of rows in the scaled image.


C
o filter:


Image filter to use.


?
o blur:


8The blur factor where > 1 is blurry, < 1 is sharp.


'
o exception:


0Return any errors or warnings in this structure.





.

SampleImage

þ
SampleImage() scales an image to the desired dimensions with pixel sampling. Unlike other scaling methods, this method does not introduce any additional color into the scaled image.

The format of the SampleImage method is:

)
Image *SampleImage ( const Image *image, const unsigned long columns, const unsigned long rows, ExceptionInfo *exception );

A description of each parameter follows:


#
o image:


The image.


%
o columns:


+The number of columns in the sampled image.


"
o rows:


(The number of rows in the sampled image.


'
o exception:


0Return any errors or warnings in this structure.





,

ScaleImage

Š
ScaleImage() changes the size of an image to the given dimensions.

The format of the ScaleImage method is:

(
Image *ScaleImage ( const Image *image, const unsigned long columns, const unsigned long rows, ExceptionInfo *exception );

A description of each parameter follows:


#
o image:


The image.


%
o columns:


*The number of columns in the scaled image.


"
o rows:


'The number of rows in the scaled image.


'
o exception:


0Return any errors or warnings in this structure.