i am trying to generate a thumb nail it works great but the thumbs are of VERY poor quality here is the codes im using
PHP Code:
function CreateThumb($picvarname, $destpath, $filename, $tsize ,$cmod="777"){
global $gal_base_path;
//This section will add a new photo
$newfilename = explode(".",$filename);
$imageinfo = getimagesize($picvarname);
PHP Code:
// for GDLib 2.0 and higher
// $dst_img = imagecreatetruecolor($new_w,$new_h);
// imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $new_w, $new_h, imagesx($src_img), imagesy($src_img));
// for GDLib < 2.0
$dst_img = imagecreate($new_w,$new_h);
imagecopyresized($dst_img, $img, 0, 0, 0, 0, $new_w, $new_h, imagesx($img), imagesy($img));
$pathstring=$destpath."gt_" . $newfilename[0] . ".jpg";
imagejpeg($dst_img, $pathstring, 75);
chmod($pathstring,"777");
return TRUE;
endswitch;
} else return FALSE;