Page 1 of 1

does -append option allow a file list?

Posted: 2008-01-13T13:20:31-07:00
by zomp
I need to use convert -append specifing a very long list of files (more than one hundred). Is it possible to pass such list to the convert command as a file?
For example, somewhat similar to the following line:

Code: Select all

convert -append list.txt result.png
where list.txt contains the following lines:

Code: Select all

file1.png
file2.png
file3.png
...
file101.png
file102.png
file103.png
...
Thanks for your wonderful program.

Re: does -append option allow a file list?

Posted: 2008-01-13T14:50:37-07:00
by magick
Try this command:
  • convert -append 'file*.png' result.png

Re: does -append option allow a file list?

Posted: 2008-01-13T16:46:45-07:00
by anthony
Note that the above is a 'legacy' method, See IM Examples Basics
http://imagemagick.org/Usage/basics/#legacy

Actually to do it correctly, read the images in, before appending.

Code: Select all

  convert image*.png -append result.png
Under a UNIX shell you can read arguments from a file using a backquote string substitution technique...

Code: Select all

convert `cat list.txt` -append result.png
Please note that ALL these methods will read in all the images into memory before creating a new image. That means it will require just under 2 times the memory needed for all the input images.

Re: does -append option allow a file list?

Posted: 2008-01-14T01:24:51-07:00
by zomp
magick wrote:Try this command:
  • convert -append 'file*.png' result.png
Yes, I have already tried this solution. But for some unexpected reason, the images are not read in order*, so that in result image I find, for example, file99.png before image1.png. I need the list file just to override the order the images are passed to convert command.

* or they are ordered, but I can not control the order they are written into the folder directory.

Re: does -append option allow a file list?

Posted: 2008-01-14T07:36:17-07:00
by magick
Try this command:
  • convert 'file?.png' 'file??.png' 'file???.png' -append result.png