Can anyone tell me how to fix this so I can make the font large, right now I think the largest is 5 and it cant go larger.
I need real large text to be printed
// load the image from the file specified:
$im = imagecreatefrompng("test.png");
// if there's an error, stop processing the page:
if(!$im)
{
die("");
}
// define some colours to use with the image
$yellow = imagecolorallocate($im, 0, 0, 0);
$black = imagecolorallocate($im, 254, 254, 254);
// get the width and the height of the image
$width = imagesx($im);
$height = imagesy($im);
ImageFilledRectangle($im,0,100,$width,200,$black);
// now we want to write in the centre of the rectangle:
$font = 5;
$text = "just a test"; // store the text we're going to write in $text
// calculate the left position of the text:
$leftTextPos = ( $width - imagefontwidth($font)*strlen($text) )/2;
// finally, write the string: 105 is from top
imagestring($im, $font, $leftTextPos, 105, $text, $yellow);
// output the image
// tell the browser what we're sending it
Header('Content-type: image/png');
// output the image as a png
imagepng($im);
// tidy up
imagedestroy($im);