Terry Carmen
2011-01-04 17:17:38 UTC
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
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