Here's a sample of resizing code
$size = getimagesize($src)
list($width, $height, $type, $attr) = $size;
$img = imagecreatefromjpeg($src);
$thumbh = $height * $thumbw/$width;
$tmp = imagecreatetruecolor($thumbw, $thumbh);
imagecopyresized($tmp, $img, 0, 0, 0, 0, $thumbw, $thumbh, $width, $height);
if (file_exists($newName))
unlink($newName);
imagejpeg($tmp, $newName); // creates thumb file
imagedestroy($tmp);
imagedestroy($img);
hth