Ah dimenticavo....
lo script è questo....(l'ho preso dal forum)


<?
function createThumb($sfile,$dfile)
{
// the passed variables are string filenames, the source and the destination

global $maxwidth,$maxheight;

$simg = imagecreatefromjpeg($sfile);
$currwidth=imagesx($simg);
$currheight=imagesy($simg);

//set the dimensions of the thumbnail
if ($currheight>$currwidth*1.7)
{
$zoom=$maxheight/$currheight;
$newheight=$maxheight;
$newwidth=$currwidth*$zoom;
}
else
{
$zoom=$maxwidth/$currwidth;
$newwidth=$maxwidth;
$newheight=$currheight*$zoom;
}

//create the resource img for the thumbnail
$dimg = imagecreate($newwidth, $newheight);

imagecopyresized($dimg, $simg, 0, 0, 0, 0, $newwidth, $newheight, $currwidth, $currheight);
imagejpeg($dimg,$dfile);

ImageDestroy($simg);
ImageDestroy($dimg);
}
?>

<?
$maxwidth=400;
$maxheight=300;

createThumb("$photo","small_$photo");
?>