PDA

View Full Version : Image Text



:Edzy
18-02-2007, 05:47 PM
http://tehwasher.co.uk/text/Hey,%20please%20could%20somebody%20provide%20me%20 for%20a%20code%20like%20this%20because%20all%20the %20ones%20ive%20tried%20arent%20working%20for%20me %20and%20i%20really%20need%20it
http://tehwasher.co.uk/text/a/Cheers
-Ed

Blob
18-02-2007, 05:49 PM
http://tehwasher.co.uk/text/Please dont use mine as it wastes up all my bandwith
http://tehwasher.co.uk/text/a/Thankyou
-Ryan

:Edzy
18-02-2007, 05:52 PM
lolz my bad
<3

Blob
18-02-2007, 06:06 PM
Try Pixel2life

F32
18-02-2007, 06:08 PM
It's GD if i'm not corrected.

:Edzy
18-02-2007, 06:20 PM
lol yer

so i got this yer:


<?php
header('Content-type: image/png');
$text = $_GET['text'];
$im = imagecreatefrompng ("radio_statsbg.gif");
$color = imagecolorallocate($im, 0, 0, 0);
$font = 'BMRECEIPT.TTF';
$fontsize = 6;
$size = imagettfbbox($fontsize, 0, $font, $text); //calculate the pixel of the string
$dx = (imagesx($im)) - (abs($size[2]-$size[0])) - 20; //calculate the location to start the text
imagettftext($im, $fontsize, 0, $dx, 13, $color, $font, $text);
imagepng($im);
imagedestroy($im);
?>

it wont work for me i get a weird error:



<br /><b>Fatal error</b>: Call to undefined function: imagecreatefrompng() in <b>/home/anyhabbo/public_html/scripts/text.php</b> on line <b>4</b><br />

I ALWAYS Get it for the imagecreate thing and it getting on my nerves coz its correct i belive

ZAG
18-02-2007, 06:25 PM
$im = imagecreatefrompng("radio_statsbg.gif");

Make sure the extensions are correct.

:Edzy
18-02-2007, 06:30 PM
still wont work

its just the

$im = imagecreatefrompng ("");

on my host but why :S ?

ZAG
18-02-2007, 06:42 PM
Do you actually have

radio_statsbg.gif

in the same folder as the php file?

:Edzy
18-02-2007, 06:48 PM
yes 8-)

Invent
18-02-2007, 06:53 PM
I dont think you have GD installed.

:Edzy
18-02-2007, 06:58 PM
that sucks ill go talk to my host now, thanks for your help!

Want to hide these adverts? Register an account for free!