imagecharup — 垂直地畫一個字元。
bool imagecharup ( resource $image , int $font , int $x , int $y , string $c , int $color )
imagecharup() 將字元c 垂直畫在image 指定的影像上,位於x,y(影像左上角為0, 0),顏色為color。如果font 為1,2,3,4 或5,則使用內建的字體。
<?php$im = imagecreate(100,100);$string = 'Note that the first letter is a N';$bg = imagecolorallocate($im, 255, 255, 255);$black = imagecolorallocate($im, 0, 0, 0);//在白色的背景上輸出黑色的"Z"imagecharup($im, 3, 10, 10, $string, $black);header('Content-type: image/png');imagepng($im);?>
以上實例輸出結果的圖片如下:
imagechar() 水平地畫一個字元。
imageloadfont() 載入一新字體。