Hi!
I'm trying to make thumbnails and save them when the are uploaded.
My server is a rental server.
PHP Version 4.3.8
GD version : bundled (2.0.23 compatible)
but JPG Support is not enabled.
this is the code I'm trying to use.
function thumbs($file_name_src, $file_name_dest, $weight) {
$size = getimagesize($file_name_src);
$w = number_format($weight, 0, ',', '');
$h = number_format(($size[1]/$size[0])*$weight,0,',','');
$dest = imagecreatetruecolor($w, $h);
$src = imagecreatefromjpeg($file_name_src);
imagecopyresampled($dest, $src, 0, 0, 0, 0, $w, $h, $size[0], $size[1]);
imagejpeg($dest,$file_name_dest,75);
return $file_name_dest;
}
I get an error message saying that functions imagecreatefromjpeg() and imagejpeg anr undefined.
Can anyone help me?
Thanks!
XOXO
Kim