sorununu tam anlamadım ama kendi yazdığım bir fonksiyon var bu konuda. en/boy oranını koruyarak resmi küçültür. eğer resim maksimum değerlerin altında ise olduğu gibi bırakır. işine yarar umarım.

<?php function resize_jpg($inputFilename, $max_w, $max_h){
	$imagedata = getimagesize($inputFilename);
	$w = $imagedata['0'];
	$h = $imagedata['1'];
	if ($w > $max_w) :
		$n_w = ($max_w / $w) * $w;
		$n_h = ($max_w / $w) * $h;	
	 elseif ($h > $max_h) :
		$n_h = ($max_h / $h) * $h;
		$n_w = ($max_h / $h) * $w;	
	else:
	$n_h=$h;
	$n_w=$w;
	 endif ;
	if ($n_h > $max_h) {
		$n_w = ($max_h / $n_h) * $n_w;	
		$n_h = ($max_h / $n_h) * $n_h;
	} 
	return 'width="'.$n_w.'" height="'.$n_h.'"';
}?>