Jump to content

Error with my PHP script image() add text thingy

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
edisonlau

edisonlau

    Newbie

  • Members
  • Pip
  • 1 posts
$fileRand = md5(rand(100000,999999));
$backgroundimage = "1.gif";

$colour = imagecolorallocate($im, 255, 255, 255);
$font = '../ARIAL.TTF';
$angle = 0;
// Add the text

$im=imagecreatefromgif($backgroundimage);
$attack=$_SESSION['attack'];
imagettftext($im, 5, 0, 10, 20, $colour, $font, $attack);



$outfile= "$fileRand.png";
imagepng($im);

Edited by Jaan, 31 May 2008 - 05:47 AM.
Please use code tags when you're posting your codes..


#2
Guest_Jaan_*

Guest_Jaan_*
  • Guests
Umm.. can you tell us what error you det?

#3
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
I don't think you can use TTF fonts. You need GD Fonts.