The image geometry specifies the desired size of the image. It's format is:

    <width>x<height>{%}{!}{<}{>}

By default, the width and height are maximum values. That is, the image is expanded or contracted to fit the width and height value while maintaining the aspect ratio of the image. Append an exclamation point to the geometry to force the image size to exactly the size you specify. For example, if you specify 640x480! the image width is set to 640 pixels and height to 480. If only one factor is specified, both the width and height assume the value.

To specify a percentage width or height instead, append %. The image size is multiplied by the width and height percentages to obtain the final image dimensions. To increase the size of an image, use a value greater than 100 (e.g. 125%). To decrease an image's size, use a percentage less than 100.

Use > to change the dimensions of the image only if its size exceeds the geometry specification. < resizes the image only if its dimensions is less than the geometry specification. For example, if you specify 640x480> and the image size is 512x512, the image size does not change. However, if the image is 1024x1024, it is resized to 640x480.

Use < to change the dimensions of the image only if its size exceeds the geometry specification. > resizes the image only if its dimensions is less than the geometry specification. For example, if you specify 640x480> and the image size is 512x512, the image size does not change. However, if the image is 1024x1024, it is resized to 640x480.

There are 72 dots per inch in PostScript coordinates.

You have your choice of algorithms to resize your image. Choose from these algorithms:

Resize
scale the image using the selected scaling filter. The default is the Mitchell filter, general overall scaling filter that produces high-quality results.
Scale
To scale a scanline from x pixels to y pixels, each new pixel represents x/y old pixels. To read x/y pixels, read (x/y rounded up) pixels but only count the required fraction of the last old pixel read in your new pixel. The remainder of the old pixel will be counted in the next new pixel.
Sample
scales image with pixel sampling. This algorithm does no introduce new colors into your image.
Resample
change the resolution of an image
Half Size
half the size of an image using a weighted average of a 4x4 cell centered at each reference pixel. The image geometry is ignored.
Double Size
double the size of an image using bi-linear interpolation. The image
Thumbnail
Create a thumbnail from your image. If there are more than one image, they are tiled on a transparent background as defined by the tile geometry (see the optional scaling attributes).

[comment]