Forum Moderators: coopster
<?php
$imgfile = 'smp.jpg';
header('Content-type: image/jpeg');list($width, $height) = getimagesize($imgfile);
$newheight = 768;
$newwidth = $newheight * ($width / $height);$thumb = ImageCreateTrueColor($newwidth,$newheight);
$source = imagecreatefromjpeg($imgfile);imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb);
?>
[us4.php.net...]
Of course, once the file is uploaded, your code should cover the rest. Just make sure the tmp directory that is used in your PHP configuration is set with the appropriate permissions. Hope that helps :)