crop question

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
yvonne
Posts: 11
Joined: 2013-04-04T15:05:34-07:00
Authentication code: 6789

crop question

Post by yvonne »

I have an image that I can't get it cropped properly. Before cropping, identify output is : GIF 255x140 255x140+0+0 8-bit sRGB 128c 10.4KB 0.000u 0:00.000

after cropping with command: convert -crop 200x140+0+0, identify output is: GIF 200x140 255x140+0+0 8-bit sRGB 128c 8.65KB 0.000u 0:00.000

Could someone give me a hint? Thanks.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: crop question

Post by Bonzo »

Have you tried adding a +repage after the crop?
yvonne
Posts: 11
Joined: 2013-04-04T15:05:34-07:00
Authentication code: 6789

Re: crop question

Post by yvonne »

thanks for your reply. I tried convert -crop 200x140+0+0 +repage & convert +repage -crop 200x140+0+0, did not help
yvonne
Posts: 11
Joined: 2013-04-04T15:05:34-07:00
Authentication code: 6789

Re: crop question

Post by yvonne »

actually, the first one works. Thanks.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: crop question

Post by anthony »

You should also read your image before the crop... If you don't it WILL break in IMv7.

Code: Select all

convert  input.png  -crop ... +repage  output.png
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply