Thumbnail function now creates "grey" thumbnails?
Posted: Thu Jun 16, 2005 1:17 pm
Hey guys -
I have this function:
It used to work fine, all the thumbnails were created reasonably well. But recently we updated the version of PHP and now the thumbnails come out very grey looking. It appears if some of the colors are just "missing" (although it's not quite black&white).
Any suggestions what I can do to fix it?
Thanks,
Peter.
I have this function:
Code: Select all
function createThumbnail($image_path, $image_id, $file, $width, $height, $compression) {
copy($file, "$image_path/$image_id");
$src_img = imagecreatefromJPEG("$image_path/$image_id");
$new_h = $height;
$new_w = $width;
$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, "$image_path/$image_id", $compression);
}Any suggestions what I can do to fix it?
Thanks,
Peter.