Te paso la función que utilizo para redimensionar imagenes:
Código PHP:
function img_redim($filename, $width='', $height='', $destino='') {
//$tmp = explode("/", $filename);
//$archivo = $tmp[count($tmp)-1];
list($width_orig, $height_orig) = getimagesize($filename);
if($width !='' && $width_orig > $width) {
$height = ($width / $width_orig) * $height_orig;
} elseif($height !='' && $height_orig > $width) {
$width = ($height / $height_orig) * $width_orig;
} else {
copy($filename, $destino);
return;
}
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
imagejpeg($image_p, $destino, 90);
}
pd: intenta definir un poco mejor el nombre de las variables, de lo contrario el código se hace difícil de seguir. Suerte!