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.
Bugs with %[...] string format IM 7.0.8.11 Q16 Mac OSX
-
- Posts: 12159
- 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
Those are warnings, not errors, sent to stderr.fmw42 wrote:All the following string format produce errors about
identify: unknown image property "%[XXX]" @ warning/property.c/InterpretImageProperties/3994.
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
- fmw42
- Posts: 25562
- 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
Thanks for correcting my oversight, snibgo.