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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
32d2d7ee
Posts: 11
Joined: 2016-09-19T01:00:08-07:00
Authentication code: 1151

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

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post by snibgo »

For mogrify, the input filename (which is also the output filename) goes at the end.
snibgo's IM pages: im.snibgo.com
32d2d7ee
Posts: 11
Joined: 2016-09-19T01:00:08-07:00
Authentication code: 1151

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

Post by 32d2d7ee »

THANKS!
You are right. Have spent much time looking at the commands and samples.
I was looking in the wrong directory
Post Reply