Page 1 of 1

To concatenate 3 borderless images *and* get a border?

Posted: 2009-06-11T09:37:02-07:00
by abaabheejaa
Hi

I wanted to contatenate three images using montage, and get a border between the images to show them as separate. Is that possible?

Also, is it possible to perhaps have a gap between adjoining images?

What I am doing now is:

montage +frame +shadow +label -geometry +2+2 -tile 3x1 image1.tif image2.tif image3.tif final.tif

Thank you for the help,

-Ashu

Re: To concatenate 3 borderless images *and* get a border?

Posted: 2009-06-11T19:06:46-07:00
by anthony
That should generate at least a 2 pixel gap between all the images.

However montage will generate an array of fixed sized cells with a 2 pixel gap between each image. The 'cells' itself will with those setting be just large enough to hold the largest dimensions of all the images.

This means that is one of the images is very small, it will have a LOT of extra space (the cell size) surrounding it! That may not be what you are after.

An alternative is...

Code: Select all

  convert image1.tif image2.tif image3.tif \
         -background white -splice 2x0 +append \
         -gravity east -splice 2x0 \
         final.tif

Re: To concatenate 3 borderless images *and* get a border?

Posted: 2010-06-09T02:33:16-07:00
by abaabheejaa
The -splice option does not seem to get recognized?

Re: To concatenate 3 borderless images *and* get a border?

Posted: 2010-06-09T08:56:44-07:00
by snibgo
"-splice" is fairly new. What version IM are you on? You may need to upgrade.

Re: To concatenate 3 borderless images *and* get a border?

Posted: 2010-06-11T10:24:00-07:00
by snibgo
Ah, that might explain the difficulty.

I'm not a Unix guru, but I'd say if you've got the IM programs (convert, mogrify, composite etc) on your path, you probably have IM. Otherwise, you probably haven't.

Re: To concatenate 3 borderless images *and* get a border?

Posted: 2010-06-11T11:05:59-07:00
by fmw42
try

convert -version

which will output
Version: ImageMagick 6.6.2-4 2010-06-09 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features:

Re: To concatenate 3 borderless images *and* get a border?

Posted: 2010-06-14T16:07:20-07:00
by anthony
snibgo wrote:"-splice" is fairly new. What version IM are you on? You may need to upgrade.
Actually splice is fairly OLD, 6 years old! It was one of the first 'new' options for IM v6, created in November 2004.

See IM examples, Splice: Creating a New Image Operator
http://www.imagemagick.org/Usage/misc/#splice