Jeg har faktisk lige lavet en artikel om upload:
http://www.eksperten.dk/artikler/1098Og du kan så evt. bruge denne funktion til at resize jpeg-billeder:
function resize( $filename, $newfilename, $maxw, $maxh )
{
$srcim = imagecreatefromjpeg( $filename );
$ow = imagesx( $srcim );
$oh = imagesy( $srcim );
$wscale = $maxw / $ow;
$hscale = $maxh / $oh;
$scale = ( $hscale < $wscale ? $hscale : $wscale );
$nw = round( $ow * $scale, 0 );
$nh = round( $oh * $scale, 0 );
$dstim = imagecreatetruecolor( $nw, $nh );
imagecopyresampled( $dstim, $srcim, 0, 0, 0, 0, $nw, $nh, $ow, $oh );
imagejpeg( $dstim, $newfilename, 85 );
imagedestroy( $dstim );
imagedestroy( $srcim );
return file_exists($newfilename);
}