Adding text in a size proportional to the image?

Terry Carmen <[email protected]> Tue, 04 Jan 2011 12:17:38 -0500
Newsgroups gmane.comp.video.image-magick.user
Message-ID <[email protected]>
I'm trying to add some text to my images that are being
hot-linked from other websites.

Adding the text works OK, however the images vary wildly in size, and  
once they're scaled in the browser, the text becomes illegible, so,  
I'd like to size the text to be a percentage of the image height, not  
a fixed point size.

For example, if the image is 400px high, I'd like 40px text. If the  
image is 4000px high, I'd like 400px text.

Can anybody toss me a clue on how I can accomplish this?

My current command is:

convert "test.gif"
-font "/path/to/font/Loma.ttf"
-pointsize 32
-geometry x500
-gravity NorthWest
-draw "text 4,4 'This text goes on the image'" gif:-

Any suggestions?

Thanks!

Terry


&nbsp;