merging 200 images into a single file

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
zsero
Posts: 9
Joined: 2011-07-13T13:55:51-07:00
Authentication code: 8675308

merging 200 images into a single file

Post by zsero »

I would like to run a long long command for merging 200 images into a single file. The command I am using at the moment is:

Code: Select all

convert a.png b.png c.png d.png .... .... .... -background transparent -flatten out.png 
The problem I am encountering now is that the command cannot be more than 8192 character long. Can you help me find a fix for this problem? As I understand I should use a text file to provide the list. But how could I do it?

Also, is this convert command compatible with multiple convert sub-commands? I mean:

Code: Select all

convert a b c -> o1 
convert d e f -> o2
convert o1 o2 -> o
Does it make sense?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: merging 200 images into a single file

Post by anthony »

Yes.... command line limits only started to become a real problem with IM v6. You only choice at this time is using an API or break your command into smaller processing steps with intermediate files.

However with that many files watch out for memory limits..


ASIDE: IMv7 will all Im to process a script of image options, or even a pipeline of commands from a shell (or other langauge) as a co-processor. EG: shell script defines the actions and a single background IM handles an processes images under its direction. For Proposed Chnages and how it would be used see..
http://www.imagemagick.org/Usage/bugs/b ... ipting.txt

However IMv7 is still in early alpha development and may be many months before it will be generally available.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply