the -annotate option is not parsing percent escapes
Posted: 2016-02-09T13:07:57-07:00
When -annotate is supplied a variable for the X offset, it ignores the whole coordinate. Yet it's able to do substitutions in the text message. E.g.
The %[rt] causes the argument to be ignored, so text string ends up in the middle of the image (it should be rotated 90 degrees and on the far right edge). If the X offset ("300") is hard-coded, then it does what it should:
Code: Select all
convert magick:logo -set option:rt '%[fx:W/2-20]' \( -fill black -gravity center -annotate 90,90+%[rt]+0 "dimensions are %Wx%H and rt is %[rt]" \) -gravity east miff:- | display -
Code: Select all
convert magick:logo -set option:rt '%[fx:W/2-20]' \( -fill black -gravity center -annotate 90,90+300+0 "dimensions are %Wx%H and rt is %[rt]" \) -gravity east miff:- | display -