Text rotation problem
Posted: 2015-07-08T09:48:54-07:00
Hey guys,
I use the following command to draw a couple of text strings on image:
The command above prints 3 strings: text1 (with shadow), text2 (with shadow), text3 (without shadow).
I need to rotate THIRD string ('text3' with shadow), for example.
When I add "rotate -5" inside "-draw" section, it rotates okay but Y-coordinate is higher than expected. Seems like it has wrong gravity. But when I add "-gravity Center" it applies to all the strings I have (text1, text2, text3).
So... How to rotate only one string? And how to rotate it around first letter, for example?
I use the following command to draw a couple of text strings on image:
Code: Select all
/usr/local/bin/convert /gifs/tmp/df47902.gif \( -font /fonts/Font.ttf -pointsize 30 -fill "#000000" -draw "text 183,130 'text1'" -fill "#ff00ff" -draw "text 181,128 'text1'" \) \( -font /fonts/Font.ttf -pointsize 30 -fill "#000000" -draw "text 57,130 'text2'" -fill "#00ffff" -draw "text 55,128 'text2'" \) \( -font /fonts/Font.ttf -pointsize 30 -fill "#ff0000" -draw "text 333,114 '
text3'" \) /gifs/res/tmp.gif
I need to rotate THIRD string ('text3' with shadow), for example.
When I add "rotate -5" inside "-draw" section, it rotates okay but Y-coordinate is higher than expected. Seems like it has wrong gravity. But when I add "-gravity Center" it applies to all the strings I have (text1, text2, text3).
So... How to rotate only one string? And how to rotate it around first letter, for example?