My second question of today... 😉
I was wondering if you could me a little with this image code please.
I need to make two modifications, which I'd be really grateful if you could help me with.
- For it to use georgia.ttf (which I have uploaded) as the TTF font of the text.
- For the text to be antialiased (smooth)
Thanks!
$text = "You are: $staffid";
// import background image
$img = @imagecreatefromjpeg("/home/img/sigbg.jpg");
imagecreatetruecolor(297, 58);
// text color
$textcolor = imagecolorallocate($img, 255, 255, 255);
// add the text to the image
imagestring($img, 2, 9, 20, $text, $textcolor);
// date in the past, so that the image is not cached by the browser
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// tell the browser what it's about to recieve
header("Content-type: image/jpeg");
// create the jpeg image
imagejpeg($img, '', 95);
// clean up
imagedestroy($img);