Page 1 of 1

Trying to batch but getting: "mogrify: unrecognized option"

Posted: 2009-09-03T16:09:38-07:00
by twinbee
Apparently one can't do many files at once (batch) with the convert tool, so mogrify is used instead. However, it comes up with this error when I try to batch drop shadow:

Code: Select all

mogrify  *.png ( +clone -background black -shadow 80x5+10+10 ) +swap  -background none  -layers merge +repage
The error is:
mogrify: unrecognized option `+clone' @ mogrify.c/MogrifyImageCommand/4307.

Surely there's a way to get round this?

Re: Trying to batch but getting: "mogrify: unrecognized option"

Posted: 2009-09-03T16:25:40-07:00
by fmw42
I don't believe that you can use parenthesis processing or clones with mogrify. It is too old. To use parenthesis and clones, you need to use convert and a script to handle multiple images. I have tried the same in the past and received the same error. Parenthesis and clones were added to IM 6 and I believe that mogrify has its roots pre-IM 6.

I will defer to the IM folks for corrections to this statement or to any updates they decide to make on mogrify

Re: Trying to batch but getting: "mogrify: unrecognized option"

Posted: 2009-09-03T16:54:58-07:00
by magick
You can use parens with mogrify however, +clone and -swap are not supported.

Re: Trying to batch but getting: "mogrify: unrecognized option"

Posted: 2009-09-03T18:15:42-07:00
by anthony
mogrify is limited to operations that process a single image. It is the only way it can handle looping over multiple images. this is why it does not allow the use of -clone -swap, or the direct use of -composition, as these all involve the use of an image sequence!

The other way is to use convert in a loop.
See IM Examples, Basics, Mogrify, Batch Processing Alternatives
http://www.imagemagick.org/Usage/basics/#mogrify_not


On proposal for IM v7 is to make mogrify a special type of looped 'convert' script. In whcih case mogrify will then handle all convert options. However this may require a syntax change to properly separate the 'image processing options' from list of images to loop over.

This is however only a proposal at this time as it also depends on a re-write of the way convert processes its options, to allow better scripting capabilities.
See http://www.imagemagick.org/Usage/bugs/I ... ations.txt

Re: Trying to batch but getting: "mogrify: unrecognized option"

Posted: 2009-09-03T19:18:27-07:00
by twinbee
Thanks all...
On proposal for IM v7 is to make mogrify a special type of looped 'convert' script. In whcih case mogrify will then handle all convert options. However this may require a syntax change to properly separate the 'image processing options' from list of images to loop over.
That would be great. It sounds as though it would unify mogrify into the main 'convert' script, and so no more updates to mogrify would ever be needed. Actually, would it really be all that tricky to add this functionality to 'convert' from afresh?

Re: Trying to batch but getting: "mogrify: unrecognized option"

Posted: 2009-09-03T19:49:43-07:00
by fmw42
sounds to me more of an update or new version of mogrify rather than folding mogrify into convert.

Re: Trying to batch but getting: "mogrify: unrecognized option"

Posted: 2009-09-03T20:38:47-07:00
by anthony
Actually it requires a major overhaul of the "convert" program, it is a IM v7 proposal.
It will be a long time coming as we need someone with a lot of time to do the job.