trouble cropping

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
greenblood
Posts: 2
Joined: 2019-09-16T10:58:10-07:00
Authentication code: 1152

trouble cropping

Post by greenblood »

Hi,

i have a raspberry pi, and im trying to crop an image thus.

i want a box 465pixels wide, 111high, with a top left pixel location of 175x780.

convert imageleft.jpg -crop 780x175+111+465 +repage chlorine.jpg

Does that command look right?

the image size is 2592x1944

cheers

steve
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: trouble cropping

Post by fmw42 »

You have your coordinates wrong. Crop is WxH+X+Y. So if you want a width=465 and height=111 at 175,780 top left corner, then use

Code: Select all

convert imageleft.jpg -crop 465x111+175+780 +repage chlorine.jpg
greenblood
Posts: 2
Joined: 2019-09-16T10:58:10-07:00
Authentication code: 1152

Re: trouble cropping

Post by greenblood »

Greta, thanks mate!
Post Reply