gd
GD Support enabled
GD Version bundled (2.0.22 compatible)
GIF Read Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
The above is my php set up.
But when I run this function
<?php
$image_path=$_SERVER['DOCUMENT_ROOT']."/SITEADMIN/z_test/";
$image_name="test.jpg";
$thumb_path=$image_path;
$thumb_width=120;
function thumbnail($image_path,$thumb_path,$image_name,$thumb_width)
{
$src_img = imagecreatefromjpeg("$image_path/$image_name");
$origw=imagesx($src_img);
$origh=imagesy($src_img);
$new_w = $thumb_width;
$diff=$origw/$new_w;
$new_h=$new_w;
$dst_img = imagecreate($new_w,$new_h);
imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));
imagejpeg($dst_img, "$thumb_path"."/t-"."$image_name");
//imagejpeg($dst_img, "$thumb_path/thumbnail.jpg");
return true;
}
thumbnail($image_path,$thumb_path,$image_name,$thumb_width);
?>
I got the error
Call to undefined function: imagecreatefromjpeg() ?
What else set up I should do?
Thanks