Page 1 of 1

montage tile spacing

Posted: 2010-07-29T13:43:36-07:00
by jcr
Hello,

When using montage geometry '+4+4' means that two images will have 8 pixels between and that images will be 4 pixels from the edge of the final image. How can I make the image so that the distance between two images is 4 pixels and not 8 pixels while the distance to the edge remains 4 pixels?

Thank you

Re: montage tile spacing

Posted: 2010-07-29T14:47:30-07:00
by fmw42
If you are only using 2 images, you can post process using -slice to remove rows or columns in the middle. See http://www.imagemagick.org/Usage/crop/#chop

However, the better and more general solution is to use -geometry +2+2 and post process with -bordercolor ... -border 2 to add a 2 pixel border all around the outside. See http://www.imagemagick.org/Usage/crop/#border. This will make the space between images 4 and the outside space 4 all around.

montage image1 image2 -geometry +2+2 <otheroptions> miff:- | convert - -bordercolor ... -border 2 resultimage

Re: montage tile spacing

Posted: 2010-07-29T15:12:44-07:00
by jcr
Thank you! Works great!