Page 1 of 1

Crop a region of an image

Posted: 2010-01-14T11:08:44-07:00
by geoclima
Hi!

I look in the forum how to crop a region of an image. I have the image linked below http://miralcamp.org/AMRADAR/AMRADAR.gif but I don't know.. or I didn't find how to crop the logo at the top-right of the image.

I use

convert AMRADAR.gif -crop 479x480-0-0 AMRADAR.gif

to remove the legend at the bottom but I don't know how to remove a region at the top right. Can anyone help me?
The size of the logo is 87x45 px and the full image 479x529.

Re: Crop a region of an image

Posted: 2010-01-14T12:50:28-07:00
by fmw42
convert AMRADAR.gif -gravity northeast -crop 87x45+0+0 +repage AMRADAR_CROP.gif

see http://www.imagemagick.org/Usage/crop/#crop and http://www.imagemagick.org/script/comma ... hp#gravity

The +repage is important.

Re: Crop a region of an image

Posted: 2010-01-15T08:48:44-07:00
by geoclima
Hi! I tried what you said and I can now crop the section but what I need and is what I didn't found in the manual is to remove that section and conserve the other part of the image. As everyone can see in the image below the original is http://miralcamp.org/AMRADAR/AMRADAR.gif and I want to obtaing something like this http://miralcamp.org/AMRADAR/AMRADAR_croped.gif.
The size of the logo is 87x45 px and the full image 479x529.
Can anyone help me?

Re: Crop a region of an image

Posted: 2010-01-15T11:33:20-07:00
by fmw42
convert AMRADAR.gif \( -size 87x45 xc:black \) -gravity northeast -compose over -composite result.gif