Montage ~4000 tiles under Windows

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
Peckori
Posts: 2
Joined: 2018-08-26T01:12:16-07:00
Authentication code: 1152

Montage ~4000 tiles under Windows

Post by Peckori »

Hello there,

I have many jpg files which all have this format: X-Y.jpg while X and Y are numbers from 0 to 62 and X&Y also define the location of the images in the final image (coordinates).

Now I've tried this command to create one image out of those many tiles:

Code: Select all

montage.exe -tile 63x63 @D:\img\list.txt D:\output\out.jpg
But it expands my image file list (list.txt) not correctly:

Code: Select all

montage.exe: unable to open image '@D:D:\input\0-59.jpg': Invalid argument @ error/blob.c/OpenBlob/3489.
Any idea on how to pass ~4000 input files under windows? The * asterisk doesn't work either under windows, neither does passing a list from stdin (which seems to allow a limited number of chars (around 86000 chars)).
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Montage ~4000 tiles under Windows

Post by dlemstra »

Do you have the name for one of the files and the line that corresponds to one of those file inside list.txt so I can try to reproduce this?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Montage ~4000 tiles under Windows

Post by snibgo »

What version of IM? What version of Windows?

IM sometimes has problems with "@X:...", @ followed by a drive. I suggest you try with the files arranged so the text file is in the current directory, so you don't need to specify drive or directory.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage ~4000 tiles under Windows

Post by fmw42 »

You could change directory to the the D:\img directory, then provide the path from the D: volume to the C: volume where you have montage

Code: Select all

C:\path\2\montage.exe -tile 63x63 @list.txt \output\out.jpg
or try

Code: Select all

TYPE D:\img\list.txt | montage.exe -tile 63x63 @- D:\output\out.jpg
or try

Code: Select all

convert.exe @D:\img\list.tx miff:- | montage - -tile 63x63 D:\output\out.jpg

Please correct my syntax, since I am not a Windows users.

If none of these work, then perhaps you have a bad file where it stops?
Peckori
Posts: 2
Joined: 2018-08-26T01:12:16-07:00
Authentication code: 1152

Re: Montage ~4000 tiles under Windows

Post by Peckori »

The solution was provided by snibgo. To explain it step by step:

1. Put the filenames in the list.txt without any prepending directory.
2. Put the list.txt file into the folder where all tiles are located
3. Open cmd and change to the directory with all the tiles and the list.txt
4. montage -tile 63x63 @list.txt out.jpg

It worked for me very well. Thanks for the hint.
And thanks to fmw42 for helping me all the time at this forum and stackoverflow. That was awesome.
Post Reply