Quoting Anthony Thyssen <[email protected]>: > > On Tue, 04 Jan 2011 12:17:38 -0500 > [email protected] wrote: > | 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? > > Set a label -size limit instead of a point size, and text of the right > size will be generated to fit. > > See IM Examples, Text Labels, Best fit > http://www.imagemagick.org/Usage/text/#label_bestfit
I'm not sure how this helps, since I still need to know the image size to select an appropriate label size. Is there any sort of option to specify text size as a percentage of image size? Thanks! Terry _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
