Adaptive image resizing

If you have a design that requires all thumbnails to be of an exact width and height, then you can use ImageMagick to adaptively resize input images to the required dimensions, without stretching or any other undesirable effects.

For example, if you had to produce a 100 x 100 thumbnail, you could use the following command:

convert input.png -resize 100x100^ -gravity center -extent 100x100 output.png