identify outputs nothing for filenames with %d

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
teleshoes
Posts: 10
Joined: 2012-09-04T10:44:22-07:00
Authentication code: 67789

identify outputs nothing for filenames with %d

Post by teleshoes »

identify without -verbose prints nothing if the filename contains a %d.
this is on ubuntu 12.10, 3.5.0-13 amd64, 6.7.7-10 2012-08-17 Q16.

identify with -verbose, or convert FILE :info, work normally.

here is the output showing what WORKS and what does NOT work:

Code: Select all

wolke:/tmp/a$ for x in a%d.png a%\!d.png a %%d %d.png a%b.png %da % a%%d.png d% a%d %d
> do
>   cp a.png $x
>   identify $x | grep PNG > /dev/null && echo GOOD: $x || echo BAD: $x
> done
BAD: a%d.png
GOOD: a%!d.png
GOOD: a
BAD: %%d
BAD: %d.png
GOOD: a%b.png
BAD: %da
GOOD: %
BAD: a%%d.png
GOOD: d%
BAD: a%d
BAD: %d

shell interpolation and quoting of arguments is NOT the problem:

Code: Select all

wolke:/tmp/a$ cp a.png a%d.png
wolke:/tmp/a$ identify a.png 
a.png PNG 80x80 80x80+0+0 8-bit DirectClass 8.59KB 0.000u 0:00.000
wolke:/tmp/a$ identify a%d.png 
wolke:/tmp/a$ identify 'a%d.png'
wolke:/tmp/a$ identify a\%d.png
wolke:/tmp/a$ identify "a%d.png"
wolke:/tmp/a$ identify "a%d.png"
wolke:/tmp/a$ identify a.png 
a.png PNG 80x80 80x80+0+0 8-bit DirectClass 8.59KB 0.000u 0:00.000
%% doesnt help:

Code: Select all

wolke:/tmp/a$ cp a.png a%d.png
wolke:/tmp/a$ identify a.png 
a.png PNG 80x80 80x80+0+0 8-bit DirectClass 8.59KB 0.000u 0:00.000
wolke:/tmp/a$ identify a%%d.png
wolke:/tmp/a$ identify a.png 
a.png PNG 80x80 80x80+0+0 8-bit DirectClass 8.59KB 0.000u 0:00.010
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: identify outputs nothing for filenames with %d

Post by fmw42 »

Verified on IM 6.7.9.3 Q16 Mac OSX Snow Leopard.

identify 1%d.jpg

returns nothing



However, both of these work:

identify -verbose 1%d.jpg

and

convert 1%d.jpg info:
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: identify outputs nothing for filenames with %d

Post by magick »

We can reproduce the problem you reported and have a patch in ImageMagick 6.7.9-4 Beta available by sometime tomorrow. Thanks.
Post Reply