How do I resize an image so that the longest size is shorter or equal to an amount?
I think that
mogrify -resize "1000>" *.jpg
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?
Thank开发者_运维知识库s!
It should keep the aspect ratio / image proportions when using a geometry string with ">", so you can just do:
mogrify -resize "1000x1000>" *.jpg
So you're explicitly limiting the image to being, at most, 1000x1000 pixels, and keeping the current aspect ratio of the image.
You could also use:
find . -type f -exec convert {} -resize "1000>" {} \;
this might also be:
find ./*.jpg -exec convert {} -resize "1000>" {} \;
精彩评论