fractalvibes
11-06-2002, 03:18 AM
Hi,
I am trying to do some image resizing with images uploaded to
a gallery in order to create thumbnails to display. The quality of the thumbnails seems to be very lacking - washed-out, blurry, whited-out is often the result. Does anyone have any ideas as to how the quality might be improved, or I am totally at the mercy of the PHP function used? Code below - any and all ideas quite welcome.
thanks,
Phil J.
-------- code follows ------------------
$size = GetImageSize($image);
$width = $size[0];
$height = $size[1];
// make it 1/4 the size
$tnwidth = $width / 4;
$tnheight = $height / 4;
// fetch the original
$src = ImageCreateFromjpeg($image);
// create a container for new image
$dest = ImageCreate($tnwidth,$tnheight);
// make the resized copy
ImageCopyResized($dest,$src,0,0,0,0,$tnwidth,$tnheight,$width, $height);
I am trying to do some image resizing with images uploaded to
a gallery in order to create thumbnails to display. The quality of the thumbnails seems to be very lacking - washed-out, blurry, whited-out is often the result. Does anyone have any ideas as to how the quality might be improved, or I am totally at the mercy of the PHP function used? Code below - any and all ideas quite welcome.
thanks,
Phil J.
-------- code follows ------------------
$size = GetImageSize($image);
$width = $size[0];
$height = $size[1];
// make it 1/4 the size
$tnwidth = $width / 4;
$tnheight = $height / 4;
// fetch the original
$src = ImageCreateFromjpeg($image);
// create a container for new image
$dest = ImageCreate($tnwidth,$tnheight);
// make the resized copy
ImageCopyResized($dest,$src,0,0,0,0,$tnwidth,$tnheight,$width, $height);