imagechar
imagechar
Draw a character horizontally
true **imagechar** GdImage $image $font int $x int $y string $char int $color
draws the first character of
in the image identified by
with its upper-left at
, (top left is 0,
0) with the color .
imagechar``char``image``x``y``color
xx-coordinate of the start.
yy-coordinate of the start.
charThe character to draw.
colorgd.identifier.color
return.true.always
Voorbeeld: example
<?php
$im = imagecreate(100, 100);
$string = 'PHP';
$bg = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
// prints a black "P" in the top left corner
imagechar($im, 1, 0, 0, $string, $black);
header('Content-type: image/png');
imagepng($im);
?>
imagecharup``imageloadfont