Page 1 of 1

cropping off the right side of an image?

Posted: 2007-08-22T15:46:40-07:00
by parsnipnose3000
Hi, I have 84 images which are 500x35 pixels.

The rightmost 86 pixels are blank, so need to only keep the leftmost 414 pixels and to retain the 35 pixels height.

How do I just trim off the right-most 86 pixels so the new image is 414x35?

Re: cropping off the right side of an image?

Posted: 2007-08-22T17:48:37-07:00
by parsnipnose3000
just in case anyone else is trying to do this, i figured it out, as follows :

convert new01.gif -crop 414x35+0+0 +repage repage_br.gif

my understanding of this is the 0+0 refers to the starting point of the crop (e.g. top left corner), and the 414x35 means keep the info up to 414 pixels to the right, and 35 down. my understanding is repage redraws the canvas

Re: cropping off the right side of an image?

Posted: 2007-08-22T23:34:51-07:00
by anthony
Alternative
-gravity East -chop 86x0

See IM examples, Cutting and Bordering, Chop
http://www.imagemagick.org/Usage/crop/#shave

This does not add virtual canvas info, is none was already present.