User defined output filenames

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

User defined output filenames

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: User defined output filenames

Post 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.
Post Reply