Ok I didn't solve the bug....it required me to recompile php with
an older version of GD. The script is ok the jaggered font is
because of a bug in the latest release of GD.
Just select the code in the comments there is info what you need
PHP Code:
<?
/***********************************************************************************************
*
* fun.php
*
* You need freetype modules installed and php compiled with --with-freetype-dir=/path/to/freetype
* You need php compiled with GD support (GD2 seems to have anti-alias bug with truecolor images)
* You need the font: [url]http://66.181.179.74/annifont.ttf[/url]
* You need the blank jpeg: [url]http://66.181.179.74/blank.jpg[/url]
*
* Enjoy!
*
* DynaMite
* UIN# 370820
*
*************************************************************************************************/
if(isset($text)) {
Header("Content-type: image/jpeg");
$imagepath = "/full/path/to/blank.jpg";
$pic = imagecreatefromjpeg($imagepath);
$textcolor = imagecolorclosest ($pic, 62, 44, 66);
imagettftext ($pic, 15, -7, 150, 280, ($textcolor*-1), "/full/path/to/annifont.ttf", $text);
imagejpeg($pic,'',100);
}
?>
<html>
<head>
<title>
GFY FUN!
</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="640" cellspacing="0" cellpadding="8" id="">
<tr>
<td width="480" bgcolor="#FFFFFF" valign="top">
<p><IMG height=337 src="blank.jpg" width=451><br />
<br />
<form action="fun.php">
Name: <input type="textfield" width=10 name=text
value="fill in here"> and press enter </form>
</p>
</td>
</tr>
</table>
</body>
</html>
DynaMite
