Leif Wessman wrote:[color=blue]
> From:
http://www.php.net/manual/en/function.imagettftext.php
> "color is the color index. Using the negative of a color index has[/color]
the[color=blue]
> effect of turning off antialiasing."
>
> I'm using a bundled version of GD: 2.0.23 compatible. When using the
> function imagettftext() with a negative color to get a aliased text[/color]
as[color=blue]
> stated in the docs the text gets grainy. Not antialised, and not
> aliased. Something in between (ugly!). I've tried several fonts.
> What could be wrong?
>
> Leif[/color]
This is my code. As you can see there is nothing special about it:
<?
header("Content-type: " . image_type_to_mime_type (IMAGETYPE_PNG));
$im = imagecreate(400, 30);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagettftext($im, 10, 0, 10, 20, -$black, "verdanab.ttf", "Testing...
Omega");
imagepng($im);
imagedestroy($im);
?>
This is the output of the script:
http://www.freewebs.com/leifwessman/test.png
As you can see, the text is grainy.