Page 1 of 1

Unable to make -crop work il command line

Posted: 2013-03-14T14:28:04-07:00
by lebuttazzoni
I am using command line to crop pics
Manual :
http://www.imagemagick.org/script/comma ... s.php#crop

Hi after a lot of try and after reading à lot of time user guide I am still unable to crop my big image ( let's say 1000x 2000) into one of 600x1000 with a resgistration point of x = 0 and y = 0

I don't anderstand how to set the % to set the registration point to 0 What's the formula ????

If someone could give and simple exemple I couldn't find anywhere else ?

Re: Unable to make -crop work il command line

Posted: 2013-03-14T15:35:23-07:00
by snibgo
I don't know what you mean by "registration point". This ...

Code: Select all

convert input.png -crop 600x1000+0+0 output.png
... will create an image 600x1000, starting at an offset of (0,0) in the input image, i.e. stating top-left.

Re: Unable to make -crop work il command line

Posted: 2013-03-14T16:27:21-07:00
by anthony
Also '%' is only used to specify a percentage size (relative to the original images size). It has no effect on the offset point being used.

On the other hand -gravity effects the offset position (and alignment)


WARNING: IMv7 "magick" command will also permit percent escapes in almost every command line option argument!
As such '%' in crop (depending on where it is) could be a percent size, or a image property inclusion.