Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Writting in picture

images php coding issues or problems here.

Moderators: macek, egami, gesf

Writting in picture

Postby shuto » Wed Jun 15, 2011 5:26 am

Hello,
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
shuto
New php-forum User
New php-forum User
 
Posts: 1
Joined: Wed Jun 15, 2011 5:19 am

Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.