Page 1 of 1

identify outputs nothing for filenames with %d

Posted: 2012-09-04T21:11:32-07:00
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

Re: identify outputs nothing for filenames with %d

Posted: 2012-09-04T21:23:19-07:00
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:

Re: identify outputs nothing for filenames with %d

Posted: 2012-09-05T04:10:02-07:00
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.