PHP imagecharup - Draw a character vertically
imagecharup — Draw a character vertically.
Syntax
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 x, y (top-left corner of the image is 0, 0), with color color. If font is 1, 2, 3, 4 or 5, a built-in font is used.
Examples
<?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);
?>
The image output of the above example is as follows:
Related Articles
- imagechar()Draw a character horizontally.
- imageloadfont()Load a new font.
PHP Image Processing