lolwut
19-10-2007, 12:01 PM
Right, I've been trying with GDLib for about 1/2 hour now without any luck...
So maybe one of you can assist me (:
Here's my gdtest.php code:
<?php
header("Content-type: image/png");
$string ="If you can see this then I assume it's working?";
$im = imagecreatefrompng("button1.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
?>
It outputs "The image “http://localhost/site/gdtest.php” (http://localhost/site/gdtest.php%E2%80%9D) cannot be displayed, because it contains errors."
"gd" part of my phpinfo page:
http://img80.imageshack.us/img80/874/dfgdfgfgdai3.png
Any help would be greatly appreicated, and I'd rep you obv. (:
So maybe one of you can assist me (:
Here's my gdtest.php code:
<?php
header("Content-type: image/png");
$string ="If you can see this then I assume it's working?";
$im = imagecreatefrompng("button1.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
?>
It outputs "The image “http://localhost/site/gdtest.php” (http://localhost/site/gdtest.php%E2%80%9D) cannot be displayed, because it contains errors."
"gd" part of my phpinfo page:
http://img80.imageshack.us/img80/874/dfgdfgfgdai3.png
Any help would be greatly appreicated, and I'd rep you obv. (: