imagecharup
PHP function
Edit on GitHub ✎
(PHP 4, PHP 5, PHP 7, PHP 8)
Draw a character vertically
Description
imagecharup(GdImage $image, GdFont|int $font, int $x, int $y, string $char, int $color): true
Draws the character char vertically at the specified coordinate on the given image.
Parameters
xx-coordinate of the start.
yy-coordinate of the start.
charThe character to draw.
colorColor
Return Values
Always
Changelog
| Version | Description |
|---|
Examples
imagecharup() example
php
<?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);
// prints a black "Z" on a white background
imagecharup($im, 3, 10, 10, $string, $black);
header('Content-type: image/png');
imagepng($im);
?>The above example will output something similar to: Output of example : imagecharup()