Page 1 of 1
Using very long commandlines with IM
Posted: 2008-04-01T11:52:06-07:00
by bablokb
Hi,
is there a mechanism to call convert with a very long commandline? Something like
and args.txt contains the commandline-arguments?
Bernhard
Re: Using very long commandlines with IM
Posted: 2008-04-01T12:08:58-07:00
by magick
The ImageMagick command line does not directly support an indirect command line reference but some options do and you can wildcard the image filenames. For example,
- convert '*.jpg' -draw @args.txt image.gif
Re: Using very long commandlines with IM
Posted: 2008-04-01T18:19:53-07:00
by fmw42
I think you should be able to put all your command line arguments in a file and write a script that would read the file and put all the text into a string variable and then have the IM command reference the string variable,
convert $commandlineargs
or
convert infile $comandlineparameters outfile
Re: Using very long commandlines with IM
Posted: 2008-04-03T09:59:55-07:00
by bablokb
The script does not help, since the bash resolves the variable-reference and you are still left with a commandline which could be just too long. In fact, my very long commandline is generated that way.
Is is possible that a future version of IM could support reading the commandline from a file? In fact, IM is more like a programming-language, so why shouldn't it read it's program from a file?
Bernhard
Re: Using very long commandlines with IM
Posted: 2008-04-03T15:07:05-07:00
by rmagick
Note that ImageMagick can be called from a number of scripting languages right now: Perl, PHP, Ruby, etc. As you rightly point out, very long ImageMagick commands lines are very nearly as complicated as a program anyway. Instead of struggling with command shells, why not make the jump to a full-fledged programming language?
Re: Using very long commandlines with IM
Posted: 2008-04-04T01:21:55-07:00
by bablokb
I have an image-processing system with 6700+ lines of bash-code. So the jump to a full-fledged programming language is not that easy. Anyhow, the current versions of bash _is_ a full-fledged programming language (well, almost).
There are certainly more important topics for IM to work on, but maybe you can put the issue on the long-run wish-list.
Thanks, Bernhard
Re: Using very long commandlines with IM
Posted: 2008-04-04T06:03:19-07:00
by magick
We have this issue on our long term to-do list. It is not a high priority but it most likely will be implemented within the next few months.