Possible bug string format %d IM 6.9.3.7 Q16 Mac OSX

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
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Possible bug string format %d IM 6.9.3.7 Q16 Mac OSX

Post by fmw42 »

Code: Select all

convert rose: -format "%d" info:
convert: unknown image property "%d" @ warning/property.c/InterpretImageProperties/3422.

see http://www.imagemagick.org/script/escape.php for %d as path to file
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Possible bug string format %d IM 6.9.3.7 Q16 Mac OSX

Post by snibgo »

%d gives the directory component of the input file, as it appears on the command line or whatever. If there is no directory component, we get a warning.

Examples:

Code: Select all

f:\web\im>%IM%identify -format %d x.tiff
identify.exe: unknown image property "%d" @ warning/property.c/InterpretImageProperties/3420.

f:\web\im>%IM%identify -format %d ./x.tiff
.

f:\web\im>%IM%identify -format %d \web\im\x.tiff
\web\im
This is in v6.9.2-5. I don't see a bug.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Possible bug string format %d IM 6.9.3.7 Q16 Mac OSX

Post by fmw42 »

IM 6.9.3.7 Q16 Mac OSX


I think it is a bug/mistake to say " unknown image property "%d".

Seems to me that it should not give that error message, but simply return an empty result. That is, since there was no formal directory in the filename, the directory is properly an empty string value.

Code: Select all

convert rose: rose.png
convert rose.png -format "%d" info:
convert: unknown image property "%d" @ warning/property.c/InterpretImageProperties/3422.


Whereas this works:

Code: Select all

convert /Users/fred/desktop/rose.png -format "%d" info:
/Users/fred/desktop
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Possible bug string format %d IM 6.9.3.7 Q16 Mac OSX

Post by snibgo »

You don't want the warning message when there is no directory component? Yes, I see your point, and think it's fair enough.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Possible bug string format %d IM 6.9.3.7 Q16 Mac OSX

Post by magick »

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.
Post Reply