Ciao solitamente io ridimensionavo le img jpg così
$name="ciao.jpg"
$img = imagecreatefromjpeg($name);
$img_width = imagesx($img);
$img_height = imagesy($img);
$thumb_width = 90;
$thumb_height = ($img_width != $thumb_width) ? floor($thumb_width * $img_height / $img_width) : $img_height;
$thumb = imagecreatetruecolor($thumb_width, $thumb_height);
imagecopyresized($thumb, $img, 0, 0, 0, 0, $thumb_width, $thumb_height, $img_width, $img_height);
imagejpeg($thumb, "small/ciao.jpg", 72);
imagedestroy($img);
imagedestroy($thumb);
Ma ora ho necessità di ridimensionare anche le img gif ho trovato
imagecreatefromgif
ma come puo essere implementato nel mio script ovvero che ridimensioni sia gif che jpg?