Easy Tutorial
❮ Func Ftp Site Php Ajax Livesearch ❯

PHP imagecharup - Draw a Character Vertically

PHP Image Processing

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 the coordinates x, y (top-left corner is 0, 0) with the color specified by color. If font is 1, 2, 3, 4, or 5, the built-in fonts are used.

Example

<?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);

// Outputs a black "Z" on a white background
imagecharup($im, 3, 10, 10, $string, $black);

header('Content-type: image/png');
imagepng($im);

?>

The above example outputs an image as follows:

Related Articles

PHP Image Processing

❮ Func Ftp Site Php Ajax Livesearch ❯