I have been working on this GD problem for a while, and its frustrating me. I don't think I need to install it, since PHP 5, which I have, has its own GD. Nonetheless, I keep getting that imagecreatetruecolor() is undefined, as are the other imaging functions, such as imagecreatefromjpeg() and imagecopyresampled(). I took some code straight from the PHP site to see what was going wrong:
<?php
// The file
$filename = 'test.jpg';
$percent = 0.5;
// Content type
header('Content-type: image/jpeg');
// Get new dimensions
list($width, $height) = getimagesize($filename);
$new_width = $width $percent;
$new_height = $height $percent;
// Resample
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
// Output
imagejpeg($image_p, null, 100);
?>
Still doesn't work. Please help :@