[solved] convert -crop gives rest images unless specify +0+0

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
User avatar
qubodup
Posts: 31
Joined: 2009-10-07T13:11:41-07:00
Authentication code: 8675309

[solved] convert -crop gives rest images unless specify +0+0

Post by qubodup »

Hello,

Code: Select all

$ convert rose: -crop 70x40 +repage rose.png
creates Image and Image but I really just want the first one.

It works when I use

Code: Select all

$ convert rose: -crop 70x40+0+0 +repage rose.png
I don't understand what difference "+0+0" does. Can somebody please explain?

Cheers
Last edited by qubodup on 2012-07-02T13:15:59-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert -crop renders rest images unless I specify +0+0?

Post by fmw42 »

without the +0+0 you are getting tile cropping. see http://www.imagemagick.org/Usage/crop/#crop_tile
User avatar
qubodup
Posts: 31
Joined: 2009-10-07T13:11:41-07:00
Authentication code: 8675309

Re: [solved] convert -crop gives rest images unless specify

Post by qubodup »

Thanks for clarifying!
expatmark
Posts: 1
Joined: 2012-10-05T04:14:46-07:00
Authentication code: 67789

Re: [solved] convert -crop gives rest images unless specify

Post by expatmark »

More precisely, the +0+0 tells the command where to use as the top left hand corner of the cropped image.

So if you use +50+50 it will start your crop area 50 pixels from the top and 50 pixels from the left. This enables you to accurately select exactly which part of the image you want.
Post Reply