Page 1 of 1

Text is not sharp in new image creation

Posted: 2012-07-02T13:17:51-07:00
by msturgill
Hi,
I am having an issue getting any text to render cleanly.

Convert( "-size=300x300","xc:white","-pointsize=12","-stroke=none","-font=c:\Windows\Fonts\ariblk.ttf", "-fill=black" ,"+antialias","-draw=text 10,50 'This is just a test'", output.jpg )
Image

Also Tried

Convert( "-size=300x300","-quality=100","-density=366", "xc:white", "-stroke=none", "-fill=black", "-font=c:\Windows\Fonts\ariblk.ttf", "-pointsize=2","caption:This is just a test","-composite","-format=jpg",output)
Image

IM v6.7.7.9 is running on Windows 7 and the code is written in VBScript. Any guidance would be much appreciated!

Thanks!
Mike

Re: Text is not sharp in new image creation

Posted: 2012-07-04T22:24:24-07:00
by whugemann
I think this has nothing to do with either Windows or VBScript. As stated on the webpage linked below, you should rather test any IM command in a CMD box before using it in VBScript. So if you type

Code: Select all

convert -size 300x300 xc:white -pointsize 12 -stroke none -font c:\Windows\Fonts\ariblk.ttf -fill black +antialias -draw "text 10,50 'This is just a test'"  output.jpg
into a CMD box, the result will be the same. But using GIF as a format and leaving the +antialias option, the result will become much clearer:

Code: Select all

convert -size 300x300 xc:white -pointsize 12 -stroke none -font c:\Windows\Fonts\ariblk.ttf -fill black  -draw "text 10,50 'This is just a test'"  output.gif
The text becomes blurry because it is rather tiny and you are using JPEG compression, which is not well suited for text.