PHPのimagecharup - 垂直に文字を描画します
imagecharup - 垂直に文字を描画します。
文法
bool imagecharup ( resource $image , int $font , int $x , int $y , string $c , int $color )
imagecharupは()のxに位置指定された画像の画像に縦に文字cを描画します、Y、色が色である(左上が0、0です)。 フォントは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()新しいフォントをロードします。