Cannot get "-set option:wizsize '%wx%h'" to work
Posted: 2018-03-21T11:04:31-07:00
In the IM documentation about the '-set'/'+set' command line options (here: https://www.imagemagick.org/script/comm ... ns.php#set) we can find this example:
This works as expected and shows like this:
Now I wanted to create in an analog way a blue 'xc:' canvas using the size of 'wizard:'
However, this only triggers an error message:
What do I miss? Anything I'm doing wrong here?
I tested with the following two versions (both self-compiled from Git sources at various recent points in time):
Code: Select all
magick convert rose: \
-set option:rosesize '%wx%h' \
-delete 0 \
label:'%[rosesize]' \
label_size_of_rose.gif
This works as expected and shows like this:
Now I wanted to create in an analog way a blue 'xc:' canvas using the size of 'wizard:'
Code: Select all
magick convert wizard: \
-set option:wizsize '%wx%h' \
-delete 0 \
-size '%[wizsize]' \
xc:blue \
blue.png
Code: Select all
convert: invalid argument for option '-size': %[wizsize] @ error/convert.c/ConvertImageCommand/2809.
I tested with the following two versions (both self-compiled from Git sources at various recent points in time):
Code: Select all
ImageMagick 7.0.7-28 Q16 x86_64 20180318 http://www.imagemagick.org ( <== on Debian Linux)
ImageMagick 7.0.7-26 Q16 x86_64 20180304 http://www.imagemagick.org ( <== on Debian Linux)
ImageMagick 7.0.7-15 Q16 x86_64 2017-12-09 http://www.imagemagick.org ( <== on macOS)