Hello
tested with Windows XP:
-draw "text 0,0 'what\'s new'"
this works perfectly
Jean
http://www.konvertor.net
how to handle apostrophe within text?
Does anyone have a solution for this under linux?
I'm using PHP's exec with commands that look like this:
\' escaping doesn't seem to work with -annotate or -draw.
I'm using PHP's exec with commands that look like this:
Code: Select all
/usr/local/bin/convert 2.jpg -resize 150x150! \( 2.jpg -resize 150x150! -blur 2 -fill 'rgba(255,255,255,0.5)' -draw 'rectangle 0,0,150,150' -fill 'rgba(255,255,255,1.0)' -draw 'rectangle 0,50,150,100' -gravity Center -font Harrison.ttf -fill black -pointsize 11 -annotate 0 'Harper's' \) -append 2a.jpg
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
The problem is the double quoting screme needed for -draw.
Look at IM examples...
Drawing Special Characters in the Text String
http://www.cit.gu.edu.au/~anthony/graph ... w/#special
You can however now avoid the double quotes and use the recomended method (with image meta data % escapes) -annotate
For example
See Annotate text to image option...
http://www.cit.gu.edu.au/~anthony/graph ... cape_chars
Look at IM examples...
Drawing Special Characters in the Text String
http://www.cit.gu.edu.au/~anthony/graph ... w/#special
You can however now avoid the double quotes and use the recomended method (with image meta data % escapes) -annotate
For example
Code: Select all
-annotate "That's it! Isn't it?"
http://www.cit.gu.edu.au/~anthony/graph ... cape_chars
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/