I resize like this
// create thumbnail (150x150)
$file = $_FILES['image_file']['tmp_name'];
list($width, $height) = getimagesize($file);
if ($width >= $height) {
// scale to width
$thumb_width = 150;
$thumb_height = $height * ($thumb_width / $width);
} else {
// scale to height
$thumb_height = 150;
$thumb_width = $width * ($thumb_height / $height);
}
$image = imagecreatefromjpeg($file);
// create thumbnail file
$thumb_image = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresampled($thumb_image, $image, 0, 0, 0, 0, $thumb_width, $thumb_height, $width, $height);
$output_file = "admin/gallery/thumbs/".$_FILES['image_file']['name'];
imagejpeg($thumb_image, $output_file, 100);
hope this helps