Imagemagick: Convert to fixed width, proportional height

前端 未结 2 1918
北荒
北荒 2021-01-30 15:26

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?

相关标签:
2条回答
  • 2021-01-30 15:58

    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
    
    0 讨论(0)
  • 2021-01-30 16:13

    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.

    0 讨论(0)
提交回复
热议问题