There are several things you must do to get the best quality images out of GD. The defaults it uses are set up to be compatible with earlier versions of GD and so do not produce the best output unless you adjust them.
- Ensure that you create TrueColor images.
Eg. my $img = GD::Image->new( 600, 400, 1 ); Without the 3rd parameter, it will produce paletized images.
- Use the AntiAliasing support ($img->setAntiAliased( $color )).
Note that you need to set the color you are going to draw with to be the AntiAliased color before you draw with it. And switch it it, each time you draw with a different color.
Also, when drawing in a foreground color that is not a good contrast with the background colors over which you are drawing, antialiasing can result in faded or fuzzy lines.
Use $img->setAntiAliasedDontBlend( $color, 1 ) to disable antialiasing over particular color(s). It takes a little experiementation to work out what looks best.
- Use TrueType fonts.
I've had trouble with this in the past, so I won't add anything more.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |