montage does not generate multiple files

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dgomes
Posts: 2
Joined: 2015-07-04T09:48:40-07:00
Authentication code: 1151

montage does not generate multiple files

Post by dgomes »

Dear all,

I don't know what I am doing wrong. I appreciate any help.

I apologize in advance if this is a more advanced discussion forum. If this post is not appropriate, please let me know where I can find more help on the matter.

I have a directory with 18 png image files, 736x1036 pixels each.

I want to generate images / pages with 3x3 images and a density of 300.

On a Windows PC on the directory where I have the pictures am typing the following command:

montage -density 300 -tile 3x3 -geometry +0+0 *.png montagefile.png

I get just one file with only 9 of the images (layed out 3x3) on it. Nothing for the rest of the 9 images.

As per the reference I found, it should generate several files (montagefile-1.png, montagefile-2.png) to accommodate all of the png image files, no?

What am I doing wrong?

What can I do to accomplish what I am trying to do?

I shall later convert all of the montagefile-* to pdf to have one file with several pages which I can print.

I really appreciate any help.

Best regards,
Daniel
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: montage does not generate multiple files

Post by fmw42 »

As per the reference I found, it should generate several files (montagefile-1.png, montagefile-2.png) to accommodate all of the png image files, no?
No, not that I know of, unless you specify only the image names you want each time and run it multiple times. The *.png means take all images in the current directory. So if you had 18 png images you are probably getting the first 9 images from the list of 18 in the 3x3 arrangement.

CORRECTION to the above: Yes, (user snibgo is right as per his reply below) montage will make multiple output images if you have more images than can be used by -tile settings. I had to test this to see that it does work. Something that I had not known before.

What was the link to your reference? For Imagemagick montage, see http://www.imagemagick.org/Usage/montage/ But I do not see -density as an argument, though it may work. If not, you need to pipe the output to convert to add the density.
dgomes
Posts: 2
Joined: 2015-07-04T09:48:40-07:00
Authentication code: 1151

Re: montage does not generate multiple files

Post by dgomes »

Any how, since I am here (ImageMagic) is there a way to do what I am trying to do with ImageMagick? I.e. auto generate the tile pages for more images that it fits into a page automatically?

Thank you!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: montage does not generate multiple files

Post by snibgo »

Yes, ImageMagick montage will create as many output images as required.
snibgo's IM pages: im.snibgo.com
Post Reply