Page 1 of 1

Montage tiling order

Posted: 2011-01-15T17:52:10-07:00
by Grujah
I have 54 images that I need to tile, 8 in a file, 2 rows with 4 images each. I did it this way:

Code: Select all

montage *.jpg \-geometry 750x1050>+0+0 \-tile 4x2 final.jpg
The problem is that in last "montaged" image, because there is only 6 images, it ends up with 4 images in 1st row and 2 images in 2nd row. I don't want that. I want 3 images in each row i.e. that when ImageMagick tiles, it goes by columns and not by rows. Is that doable?

Re: Montage tiling order

Posted: 2011-01-15T18:11:48-07:00
by fmw42
to montage by columns first, see http://www.imagemagick.org/Usage/montage/#columns or (less efficient) http://www.fmwconcepts.com/imagemagick/ ... ntage_cols

If you have command on one line, then you don't need the two \ for line breaks. I presume this is an error in pasting your command. Or is it an escape for the minus sign (which should not be needed)?

Re: Montage tiling order

Posted: 2011-01-15T18:20:28-07:00
by anthony
Not by default.

What you can do is montage the images into a single image of two long rows -tile x2
You can then tile crop this into 4x2 images (when you have worked out the montage tile size)
http://www.imagemagick.org/Usage/crop/#crop_tile
The last image will be 3x2 images.

However the order of the images will be to put the first half of the images along the top row
and the second half along the bottom, without any regard for the division of the images.


Another alternative which was just worked out is presented in
http://www.imagemagick.org/Usage/montage/#columns

This montages the images into seperate columns (in your case pairing the images in columns of two)
You then use a second montage to collect the columns into lots of 4 and trim the unused columns from the
last image, OR just create again one long image (horizontal append) and tile crop this into sections.

Basically which method you use depends on how you want the images ordered in your results.
There are many ways of doing it, and in the future we may have a set of 'layout' operators that will make it easier.
In the mean time you will need to DIY it in some way.

Re: Montage tiling order

Posted: 2011-01-15T18:23:56-07:00
by Grujah
Yeah, I feel kind of a stupid, I just found the thread asking the same question on page 2. And I also missed that section in the guide. :oops:

I changed the script to

Code: Select all

montage *.jpg \-geometry 750x1050>+0+0 \-tile 1x2 final.jpg 
montage final*.jpg -geometry +0+0 -tile 4x1 final.jpg
and it works great.

(well, it leaves few unwanted images but that not really a problem).

Thanks!