Page 1 of 1

windows 7 batch file montage tile - problem with large files

Posted: 2014-09-21T07:51:51-07:00
by RCinSTP
I am running the dos batch file below in Windows 7. It combines all 4 .jpg image files in the folder into one image file. It combines the images side by side. It works fine with 264 KB file size and maybe a bit larger but with with larger files it runs and the file it produces is zero bytes. I need to combine/tile images that are 1 MB. I don't know if the batch file is timing out because of a limitation with Windows or if there is a limitation with ImageMagick. If anyone has any ideas, I really appreciate the help. Thanks, Rick

SETLOCAL EnableDelayedExpansion
SET MONTAGE="C:\Program Files\ImageMagick\Montage"
...
%MONTAGE% *.jpg -geometry +0+0 -tile 4x1 combined.jpg

Re: windows 7 batch file montage tile - problem with large f

Posted: 2014-09-21T08:07:14-07:00
by snibgo
What is the version number of IM?

Do you get any errror message?

How many pixels are in your images? Montage probably needs 8 bytes for each input pixel, plus 8 bytes for each output pixel.

A jpeg of 1 MB could be 10 million pixels. 4 files would have 40 million pixels. That would be 320 MB for the input files, plus another 320 MB for the output file.

This might be a problem if your computer is small, with 1 or 2 GB of memory. But it should be just a performance problem, and shouldn't cause failure.

Is this a standard binary installation, or is it customised in some way?

Re: windows 7 batch file montage tile - problem with large f

Posted: 2014-09-21T08:14:46-07:00
by RCinSTP
The version of Image Magick is: ImageMagick-6.8.9-7, standard binary installation. My OS is Windows 7, 64-bit, with 3 GB RAM Memory, standard installation. I did not get any error message.

Re: windows 7 batch file montage tile - problem with large f

Posted: 2014-09-21T08:44:08-07:00
by snibgo
You didn't say how many pixels were in each file.

Try "dir *.jpg". How many files do you have? Are there actually four?

You write the output jpeg to the same directory as the input jpegs, so repeating the command will try to add this file to the montage. This is generally not a good idea.

Re: windows 7 batch file montage tile - problem with large f

Posted: 2014-09-21T09:09:53-07:00
by RCinSTP
The number of pixels in each file is 35840 x 256, wide but not very tall. Is that the info you are looking for? If not, let me know and I will find out the number of pixels.
There are exactly four files. Writing to the output directory works fine with small size image files, but I will redirect the output to a separate directory just to be safe.

Re: windows 7 batch file montage tile - problem with large f

Posted: 2014-09-21T09:32:01-07:00
by snibgo
Yes, that's what I meant. About 10 M pixels each.

With those dimensions and your command, I get an error message:

Code: Select all

montage.exe: Maximum supported image dimension is 65500 pixels `c-0.jpg' @ error/jpeg.c/JPEGErrorHandler/322.
It seems that JPEG files can't be created that large. Choose another output format such as PNG.

(I'm on IM v6.8.9-5 on Windows 8.1.)