Page 1 of 1

crop center

Posted: 2011-07-25T06:55:18-07:00
by metrizzi
Hello,

I would like to crop a center area 1290x645 from the neu_1.png. But convert.exe doesn't crop the horizontal center.
Can anyone help me?

Code: Select all

D:\CVS\EIB\bin\im\convert.exe Orig_100.png -bordercolor white -border 1000x1000 neu_1.png
D:\CVS\EIB\bin\im\convert.exe neu_1.png -gravity Center -crop 1290x644+0+0 neu_2.png
http://dl.dropbox.com/u/14657519/Orig_100.png
http://dl.dropbox.com/u/14657519/neu_1.png
http://dl.dropbox.com/u/14657519/neu_2.png

Re: crop center

Posted: 2011-07-25T07:59:22-07:00
by Bonzo
Something is wrong with your code it looks like you are trying to crop 1 pixel off the height and nothing off the width?

See http://www.imagemagick.org/script/comma ... s.php#crop

Re: crop center

Posted: 2011-07-25T10:40:45-07:00
by fmw42
add +repage after your crop command to remove the virtual canvas. see http://www.imagemagick.org/Usage/crop/#crop_repage