Hello
I recently dug out one of my old scripts that I wanted to use. With minimal changes (it worked well before), I tried it, but it returned the following error:
Fatal error: Call to undefined function: imagecreatefromjpeg()
I'm guessing this means that PHP can't find the function. But, as I said, it worked perfectly a month ago. It is possible my host has changed something on the server without my knowledge, but that would be strange. GD isn't currenty installed, but the PHP documentation says nothing about needing it and I can't remember having seen it installed when the script worked..
Can anyone suggest what might be wrong?
Thanks
Alex
Full script:
<?
// A resizing script for a gallery. This script takes the filename passed to it, finds the appropriate image (of the same name) from the full-size folder and copies a smaller version into the thumbs folder, then moves on to the result page
$src_img_name = $_REQUEST["filename"];
$image_width = $_REQUEST["width"];
$image_height = $_REQUEST["height"];
$in_jpg = imagecreatefromjpeg("./images/".$src_img_name);
$out_jpg = imagecreatetruecolor(120,90);
imagecopyresampled($out_jpg,$in_jpg,0,0,0,0,120,90,$image_width,$image_height);
imagejpeg($out_jpg, "./thumbs/".$src_img_name, 100);
imagedestroy($in_jpg);
imagedestroy($out_jpg);
header("Location: upload_result.php?filename=".$src_img_name);
?>