Page 1 of 1

mogrify crop with aspec ratio like convert xxx.jpg -gravity center -crop 3:4

Posted: 2018-09-08T08:32:07-07:00
by 32d2d7ee
I need to crop many images to a new aspect ratio and keep the upper part

This works fine with

Code: Select all

convert barn.jpg -gravity center -crop 3:2 barn_crop_3to2.jpg
However when I try

Code: Select all

mogrify barn.jpg -gravity center -crop 3:2
Nothing happens.

I know, I can give the Geometry Arguments, but I want to stay away from them, because this gives me much more flexibility!


Question: what is de mogrify alternative for convert barn.jpg -gravity center -crop 3:2 barn_crop_3to2.jpg

Re: mogrify crop with aspec ratio like convert xxx.jpg -gravity center -crop 3:4

Posted: 2018-09-08T08:52:10-07:00
by snibgo
For mogrify, the input filename (which is also the output filename) goes at the end.

Re: mogrify crop with aspec ratio like convert xxx.jpg -gravity center -crop 3:4

Posted: 2018-09-08T10:20:51-07:00
by 32d2d7ee
THANKS!
You are right. Have spent much time looking at the commands and samples.
I was looking in the wrong directory