간단한 예제...
<?php
/***************************************************************
프로그램명 : Text를 GD 이미지로 뿌리기
작성자 : 윤영식
***************************************************************/
if (!$fontsize) { $fontsize=11; }
Header ("Content-type: image/png");
$bound = ImageTTFBBox($fontsize,0,"fonts/HMTGR.TTF",stripslashes(iconv("EUC-KR","UTF-8",$text)));
$imgWidth = $bound[2]+2;
$imgHeight = $fontsize*1.2;
$im=ImageCreate($imgWidth,$imgHeight);
$white = ImageColorAllocate ($im, 255, 255, 255);
$green = ImageColorAllocate ($im, 88, 88, 88);
ImageTTFText($im,$fontsize,0,0,$imgHeight-1,$green,"fonts/HMTGR.TTF",stripslashes(iconv("EUC-KR","UTF-8",$text)));
ImagePNG($im);
ImageDestroy($im);
?>