You can use GD... it's included with most installations of PHP these days.
Here's a basic function to resize/make a thumbnail - and it even resamples it to maintain higher quality :
NOTE: This came from a book... not sure which one or else I would give credit where it's due... it's SLIGHTLY modified from the book version :
function resize($fname, $output, $max_width, $max_height, $quality = 75) {
getimagesize($fname);
$width = $size[0];
$height = $size[1];
$x_ratio = $max_width / $width;
$y_ratio = $max_height / $height;
if ( ($width <= $max_width) && ($height <= $max_height) ) {
$tn_width = $width;
$tn_height = $height;
}
else if (($x_ratio * $height) < $max_height) {
$tn_height = ceil($x_ratio * $height);
$tn_width = $max_width;
}
else {
$tn_width = ceil($y_ratio * $width);
$tn_height = $max_height;
}
$im = imagecreatefromjpeg($fname);
$dst = imagecreatetruecolor($tn_width,$tn_height);
imagecopyresampled($dst, $im, 0, 0, 0, 0,$tn_width,$tn_height,$width,$height);
imagejpeg($dst, $output, $quality);
imagedestroy($im);
imagedestroy($dst);
}
Hope it helps you out