Images in PHP
I prefer the GD library - check out the Examples, and this example:
<?php
header ("Content-type: image/png");
$im = @imagecreatetruecolor(120, 20)
or die("Cannot Initialize new GD image stream");
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>
Outputs:
(source: php.net)
See imagecreatetruecolor.
Yes this is possible. I believe there are multiple libraries to accomplish this. The most widely used is probably ImageMagick which is actually not PHP specific but comes with appropriate bindings.
See also in the PHP documentation.
Check out GD. It contains a ton of functions for image creation,manipulation and interrogation. Your PHP install just has to built with the GD library which it probably was.