Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: GD VS ImageMagick Again...

by BrowserUk (Patriarch)
on Jul 30, 2007 at 15:36 UTC ( [id://629599]=note: print w/replies, xml ) Need Help??


in reply to Re^3: GD VS ImageMagick Again...
in thread GD VS ImageMagick Again...

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.

  1. Ensure that you create TrueColor images.

    Eg. my $img = GD::Image->new( 600, 400, 1 ); Without the 3rd parameter, it will produce paletized images.

  2. 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.

  3. 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://629599]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-23 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found