I'm playing with ImageMagick's "convert" program to add text to an image.
I have something like this (which works):
convert "infile.png" -font "font.ttf" -gravity 'south' \
-stroke '#fffc' -strokewidth '3' -pointsize '300' \
-annotate 0 "Test" "outfile.png"
However, the only way I can find to size the text is using the
-pointsize option. What I want to do is make the text proportional to
the image size, eg have the text work out to 50% of the available width,
or similar. I can't find any good way to do this - and nor can I find a
suitable query for Google to assist me.
The "convert" program is being called as part of a PHP script so I can
be quite flexible in what I do if I need to be (eg if I need to create
dummy images to see what sizes they come out as, etc).
Suggestions for other programs I can use instead welcome. I know
ImageMagick and I know I can trust it with high quality images if I need
to (and will need to here) which is why I stated there.
--
Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450
Registered in England (0456 0902) @ 13 Clarke Rd, Milton Keynes, MK1 1LG