Re: Antialiasing with GD..?
| From: | Phil Driscoll | Date: | Thu, 13 Dec 2001 17:23:58 +0000 |
| Subject: | Re: Antialiasing with GD..? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77614@lists.php.net to get a copy of this message | ||
On Wednesday 12 December 2001 8:35 am, Jan Maska wrote:
> Hi,
> I have the following problem:
>
> Using the database, I create a graph like __.------._.--._/\.__
> In order to keep exact colors and prevent a JPEG detail distortion, I use
> PNG format as output.
> This has one disadvantage: all lines are rough and I don't know how to
> antialias them.
>
> Can anyone help?
I've never done this in PHP but clearly writing your own antialiased line
drawing algorithm in PHP will most likely produce something which runs too
slowly, so you need to do what you can in external libraries.
I would draw the line into a bitmap which was exactly twice the size required
and then scale the image back to the correct size when you've done with
imagecopyresampled.
Cheers
--
Phil Driscoll