如何调整图像大小以使最长大小更短或等于金额? [英] How do I resize an image so that the longest size is shorter or equal to an amount?

查看:114
本文介绍了如何调整图像大小以使最长大小更短或等于金额?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为

mogrify -resize "1000>" *.jpg

调整一堆jpeg的大小,以便短边为1000px(如果该边长于1000像素。我可以使用什么来调整jpeg的大小,使更长的方面小于1000px?

resizes a bunch of jpegs so that the shorter side is 1000px if that side was longer than 1000px. What can I use to resize the jpegs so that the longer side is less than 1000px?

谢谢!

推荐答案

当使用带有>的几何字符串时,它应该保持宽高比/图像比例,所以你可以这样做:

It should keep the aspect ratio / image proportions when using a geometry string with ">", so you can just do:

mogrify -resize "1000x1000>" *.jpg

因此,您明确将图像限制为最多1000x1000像素,并且保持图像的当前宽高比。

So you're explicitly limiting the image to being, at most, 1000x1000 pixels, and keeping the current aspect ratio of the image.

这篇关于如何调整图像大小以使最长大小更短或等于金额?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆