Re: croping image to visible area

Fred Weinhaus <[email protected]> Tue, 19 Apr 2011 09:51:54 -0700
Newsgroups gmane.comp.video.image-magick.user
Message-ID <p06240800c9d36d92bf48@[192.168.1.2]>
>Im trying to figure out convert command to crop out this little white
>piece and resize image to croped area (it's repage command i think).
>Its something like "Image->Autocrop Image" in gimp if You have it.




Your image has two frames. The second is only 1x1. So you want to 
process only the first frame.

convert el-306.gif[0] -trim +repage el-306_f0_trim.gif

However, as your white spot is not rectangular, the trim will get a 
bounding rectangle that will show some black as well as the white. It 
should end up as 5x5 pixels in widthxheight.

see http://www.imagemagick.org/Usage/crop/#trim