Page 1 of 1

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

Posted: 2018-08-30T19:32:21-07:00
by fmw42
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.

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

Posted: 2018-08-31T05:09:56-07:00
by snibgo
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

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

Posted: 2018-08-31T09:37:12-07:00
by fmw42
Thanks for correcting my oversight, snibgo.