merge few files with montage closer together
Posted: 2009-11-26T09:33:59-07:00
I have several files which I would like to merge into one file. I use this command to do this:
I use it for several files but always those which I try to merge are the same size. The problem is - they are merged but they are merged into grid of 128x126px. They are always smaller (the largest ones are 90x120px) so a lot of the space is wasted. Is it possible for them to be merged closer together? So that montage would read size of the first file and use its width and height instead of "hard-coded" 128x126px?
Also I found that then there are less than with 5 or 6 files being merged it creates file with 3 images horizontally and 2 vertically but when I merge 10 files the output file has 4 images horizontally and 3 vertically. I guess there's an algorithm that chooses the best distribution, but question is - the best distribution for what?
Code: Select all
montage -gravity northwest -background none file_*.png output.png
Also I found that then there are less than with 5 or 6 files being merged it creates file with 3 images horizontally and 2 vertically but when I merge 10 files the output file has 4 images horizontally and 3 vertically. I guess there's an algorithm that chooses the best distribution, but question is - the best distribution for what?