Combine adjust text to width with setting text color

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
microbe

Combine adjust text to width with setting text color

Post by microbe »

Hey folks,

I can get IM to convert text to an image and
a) let imagemagick auto adjust the pointsize so that the text fits
or b) adjust the color of the text stroke and fill.

Note the OR...I can't manage to get it to work with both in the same image.

If I have the width thingy right I can't seem to do the color and if I draw the stroke setting the color, I can't get the width to work.

I have searched and searched (which is how I lerned to do both of the examples above) but I can't find an example of them combined.

Does someone have an example of how to do this?

Many thanks in advance.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Combine adjust text to width with setting text color

Post by fmw42 »

see any of the methods: label:, caption:, -draw, -annotate

lots of examples at

http://www.imagemagick.org/Usage/text/

If that does not help, post your command line so that others can tell you what is wrong.

What version of IM are you using? Perhaps, if you have a very old version, you might try to upgrade.
microbe

Re: Combine adjust text to width with setting text color

Post by microbe »

Ahhh...I had seen that but was getting overloaded with information.

The trick was to use label: instead of just adding the text.

Thanks for the hint.
Post Reply