Page 1 of 1

convert type to graphic, size not working

Posted: 2008-02-20T11:12:35-07:00
by bhumes
Hi all,

New to IM, so please go easy on me...

Here is my code:

Code: Select all

convert -fill green -font "c:\WINDOWS\Fonts\tt1046m_.ttf" label:"Welcome Back Jessica" -size 500x "c:\pathtoimages\Jessica.gif"
I'm expecting an image that is 500 pixels wide with the words "Welcome Back Jessica" as large as possible in the space.

What I'm getting is a very small image (65x14). The words appear correctly, but the image is much too small.

Please help. Thank you!

Re: convert type to graphic, size not working

Posted: 2008-02-20T12:37:53-07:00
by fmw42
try

convert -size 500x500 xc:green -font "c:\WINDOWS\Fonts\tt1046m_.ttf" label:"Welcome Back Jessica" "c:\pathtoimages\Jessica.gif"

This should make a 500x500 green image with your font in it. But you need to tell it what size font you want and what color font you want and where you want it placed.

See

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

Re: convert type to graphic, size not working

Posted: 2008-02-20T12:51:22-07:00
by bhumes
Thanks for you reply.

I tried a couple things based on your post and I found that the problem was that I need to declare the size first. So, the following works just fine:

Code: Select all

convert -size 400x -fill green -font "c:\WINDOWS\Fonts\tt1046m_.ttf" label:"Welcome Back Jessica" "c:\pathtoimages\Jessica.gif"

Re: convert type to graphic, size not working

Posted: 2008-02-20T21:39:56-07:00
by anthony
See IM Examples, Basics.

Settings are saved and Operations applied in command line oder.

Re: convert type to graphic, size not working

Posted: 2008-02-21T08:13:52-07:00
by bhumes
Thank you, Anthony. I missed that the first time around.