Kaity's code for Drawing Text on an Image
SLAVE CODE FOLLOWS
<?php // combine two images (i.e., jpg/png) to create a watermark
$name = "Kaity";
// get the images from files
$image = imagecreatefrompng("images/ghost-cat.png");
// get sizes
$width = 500;
$height = 500;
$font = "fonts/arial.ttf";
// sets the current foreground color to RGB (0, 0, 0), which is BLACK
$white = imagecolorallocate($image, 255, 255, 255);
// combines the image with text using the following specs
// (image, font-size, angle-rotation, x-coord, y-coord, text-color, font-name, text)
imagettftext($image, 100, 45, 100, $height - 4, $white, $font, $name);
//=== display the image
// tell the server that a PNG image follows
header("Content-type: image/png");
// display the image
imagepng($image);
// destroy the image (i.e., release memory)
imagedestroy ($image);
?>