Is there any way to use convert and ask it to take all the parameters from a file? I have a 100 files that I would like to append (in a specified order) to one another to create a very large image, and then crop and resize the result, etc.
Or is the only way to do it to split it up into multiple convert commands?
Very long command line
Re: Very long command line
Some of convert's options can be placed in a file and you can also use wildcards to shorten the command line length. You could say, for example,
- convert "*.jpg" image.png
Re: Very long command line
Since the order is important the globbing will not work unfortunately. Outside of draw parameters is there anything else that can be in a file? If yes, where can I find the list of the ones that are?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Very long command line
You can also pipeline the output of separate commands into one IM.
For example
The convert commands can do what ever individual image process you need, in the image order you need. The loop output will be a stream of images, one after the other that a single command will read as a single image sequence.
You can even do your montage labeling in the convert command, rather than a global label in the montage.
It is one of the lesser used features of the Magick Image File Format (MIFF). I have used it in scripts to process a recursive directorys of images.
WARNING: the convert should also do the montage size reduction (thumbnailing) to reduce the size of the images being passed to montage (or whatever further processing you are doing).
For example
Code: Select all
for ...loop thru files in order wanted....
convert image ...options... miff:-
done | montage miff:- ...montage_options... image_page%02d.png
You can even do your montage labeling in the convert command, rather than a global label in the montage.
It is one of the lesser used features of the Magick Image File Format (MIFF). I have used it in scripts to process a recursive directorys of images.
WARNING: the convert should also do the montage size reduction (thumbnailing) to reduce the size of the images being passed to montage (or whatever further processing you are doing).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/