%%25 in filename

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
aaronmueller
Posts: 2
Joined: 2012-02-22T09:49:49-07:00
Authentication code: 8675308

%%25 in filename

Post by aaronmueller »

Hi!

I've noticed a problem on renaming for output files. Try this:

1. Name a File test.jpg
2. $ convert test.jpg "%%25.jpg"

The filename is "%25.jpg" after the convert. This happens not only on
the convert binary, the RMagick2 rubygem has the same behaviour.

I use Arch Linux (kernel 3.2), Imagemagick 6.7.5.3-1 and rmagick 2.13.1
from the repo.

Aaron
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: %%25 in filename

Post by anthony »

% is used in output filenames for adding 'frame numbers' to images.

for example page_%d.jpg

To escape a percent (and produce one percent) two percents are used. EG: %% produces one %

That is the reason!!!

Their is no switch or option at this time to make all filenames 'literal'.
Though that is a possibility as a future addition.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
aaronmueller
Posts: 2
Joined: 2012-02-22T09:49:49-07:00
Authentication code: 8675308

Re: %%25 in filename

Post by aaronmueller »

ah that makes sense. Thanks!
Post Reply