I have a question regarding how to use parameters definde with -set option together with fx percent escapes.
This is an example from http://www.imagemagick.org/Usage/distorts/#distort:
Code: Select all
convert rose: -set option:rw %w -set option:rh %h +delete \
logo: -alpha set -virtual-pixel transparent \
+distort Affine '0,0 0,0 %w,0 %[rw],0 0,%h 0,%[rh]' \
+repage logo_sized_as_rose.png
The width and height for the original image is first defined in the first line into the parameters rw and rh, and then used in the distort command by a percent escape: %[rw] and %[rh].
OK, now to my question. Let's say I would like the new image to be twice the size of the original image. Is it possible to use the rh and rh parameters in an fx commands, something like this:
Code: Select all
+distort Affine '0,0 0,0 %w,0 %[fx:rw*2],0 0,%h 0,%[fx:rh*2]'
I'm using IM 6.9.7 on Win 10