English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
imagecharup — Draw a character vertically.
bool imagecharup ( resource $image , int $font , int $x , int $y , string $c , int $color )
imagecharup() draws the character c vertically on the image specified by image, at position x, y (the top left corner of the image is 0, 0), with color color. If font is 1,2,3,4 Or 5If you want to use the built-in font.
<?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); // Output the black character "Z" on a white background imagecharup($im, 3, 10, 10, $string, $black); header('Content-type: image/png'); imagepng($im); ?>
The image of the output result of the above example is as follows:
imagechar() Draw a character horizontally.
imageloadfont() Load a new font.