Text is not sharp in new image creation

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
msturgill
Posts: 2
Joined: 2012-07-02T12:46:49-07:00
Authentication code: 13

Text is not sharp in new image creation

Post 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
User avatar
whugemann
Posts: 289
Joined: 2011-03-28T07:11:31-07:00
Authentication code: 8675308
Location: Münster, Germany 52°N,7.6°E

Re: Text is not sharp in new image creation

Post 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.
Wolfgang Hugemann
Post Reply