Hello people,
With the implementation of GD 2 in the latest version of PHP, weren't there supposed to be some new functions that creat better JPG thumbnails?
I have a script right now that looks like this:
//if a file was uploaded
$file_name = "$ID.jpg";
if( @copy($file, "mypath/$file_name") )
{
$iname="$file";
$x=60;
$y=87;
$srcimage = ImageCreateFromJPEG ($iname);
$newimage = imagecreate ($x, $y);
imagecopyresized ($newimage, $srcimage, 0, 0, 0, 0, $x, $y, imagesx($srcimage), imagesy($srcimage));
imagejpeg($newimage,"mypath/$ID.jpg");
//delete the temporary uploaded image
unlink($file);
}
Now, can someone fill me in on the new functions, or help me make my code a little tighter to get "unchunky", pixelated thumbs? I want some smooth looking, hi-rez thumbs.
Any, and all help is much appreciated!!!