图片的缩放处理

"c:Program FilesImageMagick-6.9.9-Q16identify.exe" -format "%[fx:w]x%[fx:h]"  111.jpg

返回:
1080x1440

A   x   B

# 如果宽比高大,表示是横版
if A>=B:
  pass

# 如果高比宽要大,表示是竖版
else:
  pass


1024x768

# 如果是横版
"c:Program FilesImageMagick-6.9.9-Q16convert.exe" -resize 1024 111.jpg 111_heng.jpg

# 如果是竖版
"c:Program FilesImageMagick-6.9.9-Q16convert.exe" -resize x768 111.jpg 111_shu.jpg
原文地址:https://www.cnblogs.com/littlehb/p/8710916.html