IM annotate/rotate - removes text behind space
Posted: 2014-02-13T07:49:13-07:00
I'm tyring to add some text on the right (east) side of my image. It has to be rotated and all of that works just fine. But for some reason ImageMagick removes every word behind a space. I already tried to remove the spaces and put a bunch of text behind This (Thisdkjlaalkdfsaf) to see if the textfield is limited. But its not, so its got something to do with my code I think.
This is the code I'm using:
The only thing thats showing on my image is the word: This
So it doesn't show me: is my text
But I want the textline to say: This is my text
I used this sample code from the ImageMagick site:
This is how I want my text placement (in the ImageMagick example its on the left, but I want it on the right):

Source: http://www.imagemagick.org/Usage/annotating/
So I want the full text to be shown: This is my text on the right side (rotated). I'm using ImageMagick version 6.8.1-8 Q16 on Windows 7 32-bit.
This is the code I'm using:
Code: Select all
$text = 'This is my text';
exec("new.jpg -rotate -270 -gravity southwest -annotate 0 ".$text." -rotate 270 newimage.jpg");
So it doesn't show me: is my text
But I want the textline to say: This is my text
I used this sample code from the ImageMagick site:
Code: Select all
convert rings.jpg -rotate -90 \
-gravity South -annotate +0+2 'String' \
-rotate 90 gravity_text_left.jpg

Source: http://www.imagemagick.org/Usage/annotating/
So I want the full text to be shown: This is my text on the right side (rotated). I'm using ImageMagick version 6.8.1-8 Q16 on Windows 7 32-bit.