Page 1 of 1

montage tiles by column order

Posted: 2011-01-01T16:09:51-07:00
by mese79
Hi
i have thousands of small tile images and i want to merge them into a big image.
My tile file names ordered by column not row. i mean like pic_x_y.png (i.e. pic_01_01.png, pic01_02.png, pic01_03.png...pic02_01.png, pic02_02.png...)
But AFAIK 'montage' command do montage by row order. so is there any option or command to do it by column order ?
thanks

Re: montage tiles by column order

Posted: 2011-01-01T17:35:00-07:00
by fmw42
You can write a script to append by column, do as many columns as you need, then append the columns by row. See -append for columns and +append for rows.

The other way is to transpose each image, montage them, then transpose the result. For example:

convert checks.png lena2.jpg hatching.jpg zelda3.jpg -transpose miff:- | montage - -geometry +2+2 -tile 2x2 miff:- | convert - -transpose test2.jpg

Re: montage tiles by column order

Posted: 2011-01-03T18:12:58-07:00
by anthony
Using two montage's will avoid the need for transposing...

The first montage creates columns, and sets tile size, frames etc. The second just contatanates into pages (number of columns).
In this case a 5x4 montage...

Code: Select all

montage -label %f im/img_photos/*_orig.jpg -geometry 120x120+2+2 -frame 5 -tile 1x4 miff:- |\
    montage - -geometry +0+0 -tile 5x1   montage_columns.jpg
If only one image of variable number of columns is wanted replace the second montage wit ha convert append.

Code: Select all

montage -label %f im/img_photos/*_orig.jpg -geometry 120x120+2+2 -frame 5 -tile 1x4 miff:- |\
  convert - +append montage_columns_2.jpg
I am adding this to IM Examples, Montage, Montage into Columns
http://www.imagemagick.org/Usage/montage/#columns