Set Font size

<?php
$textImage = imagecreate(200,100);
$white = imagecolorallocate($textImage, 255, 255, 255);
$black = imagecolorallocate($textImage, 0, 0, 0);
$yOffset = 0;
for ($i = 1; $i <=5; $i++) {
imagestring($textImage, $i, 5, $yOffset, "www.java2s.com $i", $black);
$yOffset += imagefontheight($i);
}
header("Content-type: image/png");
imagepng($textImage);
imagedestroy($textImage);
?>

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Comment

Your email address will not be published. Required fields are marked *