Page 1 of 1

User defined output filenames

Posted: 2011-07-26T18:39:50-07:00
by anthony
For some reason the user defined output filenames are going haywire!

For example try this (quotes needed to protect the filename from the command line shell)

Code: Select all

   convert rose: -duplicate 4 -set filename:base %t \
         -reverse -set filename:index %t  +adjoin  "rose-%[filename:base]-%[filename:index].gif"
resulting filenames should be...
rose-4-0.gif rose-3-1.gif rose-2-2.gif rose-1-3.gif rose-0-4.gif

But I am getting...
rose-%[filename:base]-%[filename:index]-0.gif
rose-%[filename:base]-%[filename:index]-1.gif
rose-%[filename:base]-%[filename:index]-2.gif
rose-%[filename:base]-%[filename:index]-3.gif
rose-%[filename:base]-%[filename:index]-4.gif

That is the %[filename:...] escape is not being substituted.

Version: ImageMagick 6.7.1-1 2011-07-25 Q16
downloaded and compiled from SVN.

Re: User defined output filenames

Posted: 2011-07-26T19:04:41-07:00
by magick
We can reproduce the problem you reported. We have a patch in ImageMagick 6.7.1-1 Beta to fix the problem. Note %t of rose: returns null because rose: is considered a prefix and is not considered part of the base filename. Instead try rose:rose as the image filename.