GraphicsMagick Search site

- Home
- License
- Mission
- Download
- Installation
- FAQ
- News
- Formats

- Process
- Contribute
- CVS
- Mailing Lists
- ChangeLog
- Report Bugs
- Utilities
- Programming
- Links

# resize

## Resize an image

Contents

- MagnifyImage
- MinifyImage
- ResizeImage
- SampleImage
- ScaleImage
- ThumbnailImage

# MagnifyImage

## Synopsis

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

## Description

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:

image:
  The image.
exception:
  Return any errors or warnings in this structure.

# MinifyImage

## Synopsis

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

## Description

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:

image:
  The image.
exception:
  Return any errors or warnings in this structure.

# ResizeImage

## Synopsis

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

## Description

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 );

image:
  The image.
columns:
  The number of columns in the scaled image.
rows:
  The number of rows in the scaled image.
filter:
  Image filter to use.
blur:
  The blur factor where > 1 is blurry, < 1 is sharp.
exception:
  Return any errors or warnings in this structure.

# SampleImage

## Synopsis

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

## Description

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 );

image:
  The image.
columns:
  The number of columns in the sampled image.
rows:
  The number of rows in the sampled image.
exception:
  Return any errors or warnings in this structure.

# ScaleImage

## Synopsis

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

## Description

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 );

image:
  The image.
columns:
  The number of columns in the scaled image.
rows:
  The number of rows in the scaled image.
exception:
  Return any errors or warnings in this structure.

# ThumbnailImage

## Synopsis

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

## Description

ThumbnailImage() changes the size of an image to the given dimensions. This method was designed by Bob Friesenhahn as a low cost thumbnail generator.

The format of the ThumbnailImage method is:

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

image:
  The image.
columns:
  The number of columns in the scaled image.
rows:
  The number of rows in the scaled image.
exception:
  Return any errors or warnings in this structure.

# Docutils System Messages

System Message: ERROR/3 (`/home/bfriesen/src/graphics/GraphicsMagick-1.3/www/api/resize.apirst`, line 138); backlink

Unknown target name: "filtertypes".

System Message: ERROR/3 (`/home/bfriesen/src/graphics/GraphicsMagick-1.3/www/api/resize.apirst`, line 163); backlink

Unknown target name: "filtertypes".