Re: [GD-DEVEL] trouble with antialiasing

[email protected] (Pierre)
Newsgroups php.gd.devel
Message-ID <[email protected]>
Hi Eric,

On 10/26/07, Eric Tucker <[email protected]> wrote:
> Hi,
>
> I am having trouble getting even the most basic antialiasing to work.
> I copied the example right out of the manual and built it in as much
> isolation as possible, but am still getting a non-antialiased line.
> My test source file is included below, and I am building it with:
>
>     gcc -lgd -o gtest gtest.c
>
> This is on Fedora Core 6, with gd-2.0.35-1.fc6 and
> gd-devel-2.0.35-1.fc6.
>
> I was able to get it to antialias by both (a) creating the image
> instead with gdImageCreateTrueColor(), and (b) changing the second
> 99 to a 49, thus making the line be at less than a 45-degree angle.
> But these seem arbitrary to me -- I was just thrashing around
> randomly -- and I don't see why the original code does not work.
>
> Am I missing something obvious here?

>     im = gdImageCreate(100, 100);

im = gdImageCreateTrueColor(100,100);

Truecolor image has AA support.

Cheers,
--Pierrre
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.