large montage problem

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
Slyce
Posts: 4
Joined: 2016-04-11T22:26:39-07:00
Authentication code: 1151

large montage problem

Post by Slyce »

I'm trying to montage just over 1,200 10*10 images at the cygwin commandline.
I get this error:
$ montage -geometry +2+2 directory-with-images/*.bmp final-montage.jpg
-bash: /cygdrive/c/Program Files/ImageMagick-6.9.3-Q16/montage: Argument list too long

I've been googling and googling with no success.
It would be nice if I could just specify the directory, then it wouldn't have the *.bmp expansion problem.

So, how do I montage this many images?
thanks!
yup
Posts: 8
Joined: 2016-04-10T04:32:49-07:00
Authentication code: 1151

Re: large montage problem

Post by yup »

Create a text file (for example, list.txt) with a list of your source files, and use it as:

Code: Select all

montage -geometry +2+2 @list.txt final-montage.jpg
(See section "Filename References" at http://www.imagemagick.org/script/comma ... essing.php for more details.)
Slyce
Posts: 4
Joined: 2016-04-11T22:26:39-07:00
Authentication code: 1151

Re: large montage problem

Post by Slyce »

thanks. That mostly worked:
ls -1tr directory-with-images/* > image-list.txt
montage -geometry +2+2 @image-list.txt final-montage.jpg

Though it has a weird output. Instead of 1 giant square it has 1 big square, 3 medium squares and 1 small square.
I don't get why.

This is my first use of this tool, so I don't really know what I am doing.
I tried specifying tile:
$ montage -geometry +2+2 -tile 36x36 @image-list.txt final-montage.jpg
but got the same weird shape.
yup
Posts: 8
Joined: 2016-04-10T04:32:49-07:00
Authentication code: 1151

Re: large montage problem

Post by yup »

Are you sure that all your source images are 10x10 pixels?

With command line like:

Code: Select all

montage -mode concatenate -tile 195x158 @picture.lst tiff64:picture.tif
I create images from tens of thousands source files, and every time I get a perfect output image.
Slyce wrote:This is my first use of this tool
I use ImageMagick something about a week too :)
Slyce
Posts: 4
Joined: 2016-04-11T22:26:39-07:00
Authentication code: 1151

Re: large montage problem

Post by Slyce »

Yup. All images are 10*10.
Here is the output image:
Image
Slyce
Posts: 4
Joined: 2016-04-11T22:26:39-07:00
Authentication code: 1151

Re: large montage problem

Post by Slyce »

solved it. There was a bug in my code that made the 10*10 images. Works now.
yup
Posts: 8
Joined: 2016-04-10T04:32:49-07:00
Authentication code: 1151

Re: large montage problem

Post by yup »

Glad you have solved your problem.
Post Reply