Bugs with %[...] string format IM 7.0.8.11 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: 24121
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Bugs with %[...] string format IM 7.0.8.11 Q16 Mac OSX

Post by fmw42 » 2018-08-30T19:32:21-07:00

All the following string format produce errors about

identify: unknown image property "%[XXX]" @ warning/property.c/InterpretImageProperties/3994.


magick identify -format "%[caption]\n" lena.jpg
magick identify -format "%[caption:pointsize]\n" lena.jpg
magick identify -format "%[colors]\n" lena.jpg
magick identify -format "%[deskew:angle]\n" lena.jpg
magick identify -format "%[distortion]\n" lena.jpg
magick identify -format "%[group]\n" lena.jpg
magick identify -format "%[label]\n" lena.jpg
magick identify -format "%[label:pointsize]\n" lena.jpg
magick identify -format "%[profile:icc]\n" lena.jpg
magick identify -format "%[profile:icm]\n" lena.jpg
magick identify -format "%[profiles]\n" lena.jpg
magick identify -format "%[rendering-intent]\n" lena.jpg
magick identify -format "%[zero]\n" lena.jpg

If some of these give such results simply because they are not relevant for the image, then it would seem to me that it should just say: undefined



These two give strange undefined values:

magick identify -format "%[printsize.x]\n" lena.jpg
2.56e+14
magick identify -format "%[printsize.y]\n" lena.jpg
2.56e+14

This one returns nothing:

magick identify -format "%[unique]\n" lena.jpg nothing


It seems to me that %{colors] and %[unique] should return something. If there are too many colors or too many unique colors, it should return some other error message, say, too many colors.

snibgo
Posts: 10952
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Bugs with %[...] string format IM 7.0.8.11 Q16 Mac OSX

Post by snibgo » 2018-08-31T05:09:56-07:00

fmw42 wrote:All the following string format produce errors about

identify: unknown image property "%[XXX]" @ warning/property.c/InterpretImageProperties/3994.
Those are warnings, not errors, sent to stderr.

The stdout result from "-format %[XXX]" where XXX is not a defined property etc is the empty string, a string of no length. If you want that to change so it returns some other string such as "undefined", that would break existing scripts.

I don't know why %[colors] doesn't return a number. That looks like a bug.

%[printsize.x] should return a number, I suppose in the current units. There seems to be a bug.

I've never understood what %[unique] and %[zero] should return. %[unique] should be a filename, not the number of unique colours, according to http://www.imagemagick.org/script/escape.php
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 24121
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Bugs with %[...] string format IM 7.0.8.11 Q16 Mac OSX

Post by fmw42 » 2018-08-31T09:37:12-07:00

Thanks for correcting my oversight, snibgo.

Post Reply