Backslash ("\") instead of Text?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Post by Bonzo »

It must be the way the server is setup or the version of ImageMagick used as it worked OK for me.

I would try:

Code: Select all

exec("convert -size 500x500 old.jpg -thumbnail 150x150 -gravity South -bordercolor black -border 1x1 -background Black -splice 0x15 -fill white -draw \" text 0,0 '150x150 23kb' \" new.jpg");
Sometimes I find that ImageMagick does not like paths etc. and it works better putting paths and text into a variable first;

Code: Select all

$text = "150x150 23kb";
exec("convert -size 500x500 old.jpg -thumbnail 150x150 -gravity South -bordercolor black -border 1x1 -background Black -splice 0x15 -fill white -draw \" text 0,0 '$text' \" new.jpg");
Post Reply