ImageMagick change aspect ratio without scaling the image

前端 未结 1 1508
北海茫月
北海茫月 2021-02-14 20:19

I have a large number of images that can be any dimension that I need make into the same aspect ratio (basically square). So if one image is 100x300 the output should be 300x30

相关标签:
1条回答
  • 2021-02-14 20:47
    convert input.png -background white -gravity center -extent 100x300 -flatten output.png
    

    See http://www.imagemagick.org/Usage/crop/#extent

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