Grazie Luca, ma non funziona.
Ho provato però a sostituire
Codice PHP:
if ($width > 120) {
$ratio = 120 / $width;
$newheight = $ratio * $height; }
else $newheight = $height;
$sm_image = imagecreatetruecolor(120,$newheight) or die ("Cannot Initialize new gd image stream");;
Imagecopyresampled($sm_image,$orig_image,0,0,0,0,120,$newheight,imagesx($orig_image),imagesy($orig_image));
con
Codice PHP:
if ($height > 120) {
$ratio = 120 /$height;
$newwidth = $ratio * $width; }
else $newwidth = width;
$sm_image = imagecreatetruecolor($newwidth,120) or die ("Cannot Initialize new gd image stream");;
Imagecopyresampled($sm_image,$orig_image,0,0,0,0,$newwidth,120,imagesx($orig_image),imagesy($orig_image));
e funziona.