views:

47

answers:

1

This command add the text "flower" to the image:

convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg

I'm using ImageMagick 2.2.0. I'm running it from PHP using:

system('convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg');

but I'm not getting the result

A: 

Escape the single-quotes in the parameters:

system('convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 \'Flower\' flower_annotate1.jpg');

Or just wrap the thing in double-quotes so you don't have to escape them.

tadamson