imagestringup

(PHP 3, PHP 4 , PHP 5)

imagestringup -- Draw a string vertically

Description

int imagestringup ( resource image, int font, int x, int y, string s, int col)

imagestringup() draws the string s vertically in the image identified by image at coordinates x, y (top left is 0, 0) in color col. If font is 1, 2, 3, 4 or 5, a built-in font is used.

See also imageloadfont().

ecolorallocate($im, 255, 255, 255);
  
$textcolor = imagecolorallocate($im, 0, 0, 255);
  
  
// write the string at the top left
  
imagestring($im, 5, 0, 0, "Hello world!", $textcolor);
  
  
// output the image
  
header("Content-type: image/jpg");
  
imagejpeg($im);
?>