Imagemagick: Convert to fixed width, proportional height

Using the imagemagick convert command, how can I resize an image to a fixed width and proportional height e.g. using the -resize or the -thumbnail option?


Solution 1:

Use -resize 100x to resize images to 100 pixels in width while maintaining the height's aspect ratio.

Read the fine ImageMagick manual for details.

Solution 2:

Imagemagick geometry: 'width'x'height' If you leave one part empty, this means resize proportional.

Examples:

100x200       # width = 100, height = 200
300x          # width = 300, height = proportional
x300          # width = proportional, height = 300