Código PHP:
function thumbnail($image){
$original = @imagecreatefromjpeg($image);
$datos=getimagesize($image);
$ratio = ($datos[1] /240);
$anchura = @round($datos[0] / $ratio);
$thumb = @imagecreatetruecolor($anchura,240);
@imagecopyresized ($thumb, $original, 0, 0, 0, 0, $anchura, 240, $datos[0], $datos[1]);
if (imagejpeg($thumb,$image,90))
return (true);
else
return (false);
}
![de acuerdo](http://static.forosdelweb.com/fdwtheme/images/smilies/dedosarriba.png)