Hi, ive been attempting to delve deeper into the world of php, more directly creating dynamic images using php. So went for a bit of a look around, and found some really useful stuff on php.net (real good site that one).
Anyway yeah, was a bit confused about all these extra things they were talking about here. Do i need the gD thingy or the libPNG?? I have Apache 2.0.54 running on my windows xp, with php 5.1.2. Just installed it all pretty much standard i think.
Anyway yeah, so i found this script on that page on php.net and well, it dont work:
<?php
header("Content-type: image/png");
$string = $_GET['text'];
$im = imagecreatefrompng("images/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 comes up with this when i try it out:
<br />
<b>Fatal error</b>: Call to undefined function imagecreatefrompng() in <b>E:\SERVER\Apache2\htdocs\php\pic\string.php</b> on line <b>5</b><br />
I am passing a variable to text, and have a png in the correct place (well at least i think it is), but yeah the error says imagecreatefrompng() is an undefined function. Whats going on. Is that part of the gD thingy that i need to install??
Thanks in advance, this is php stuff is all a bit intense.
-Aussie Devil