Hi all.
I am using the following code to create a thumbnail from a jpeg image.
I have used this in two different ISP's with different versions of php.
On the first ISP, after running phpinfo() they have the following versions:
PHP Version 4.2.2
GD 1.6.2 or higher
On this host the thumbnail converison works fine.
On the second ISP, the same code creates thumbnails that look sepia tone.
phpinfo() details are:
PHP Version 4.3.4
GD - bundled (2.0.15 compatible)
I have tried imagecopyresampled as well but to no avail.
THanks for your help.
function thumbnail_convert($image_path, $thumb_path, $image_name, $thumb_width)
{
echo "<b>$image_path/$image_name</b>";
$src_img = imagecreatefromjpeg("$image_path/$image_name");
$origw=imagesx($src_img);
$origh=imagesy($src_img);
$new_w = $origw / 5;
$new_h = $origh / 5;
$dst_img = imagecreate($new_w,$new_h);
// imagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));
imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));
imagejpeg($dst_img, "$thumb_path/$image_name");
return true;
}