I have a little problem.I want to write for example a name from registration form automatically into my image and then print that image(printing isnt important).I tried it like this:
- Code: Select all
$name = $_GET["n"];
$picture = imagecreatefrompng("pozadi2.png");
$textcolor = imagecolorallocate($picture,0,0,0);
imagettftext ($picture, 25, 45, 76, 35, $textcolor, "arial.ttf", $name) ;
header("Content-type: image/png");
imagepng($picture);
imagedestroy ($picture);
And it seems to give me this:
Picture “http://example.sk/generator/priklad3.php” cannot display because of failure.(or something like that..i'm not sure at the moment)
Any solution???thx

