boh prova con questa funzione
codice:
function resize ($picture, $type, $max) {
if ($type == "image/pjpeg" || $type == "image/jpeg") {
$src_img=imagecreatefromjpeg($picture);
$oh = imagesy($src_img); # original height
$ow = imagesx($src_img); # original width
$new_h = $oh;
$new_w = $ow;
if($oh > $max || $ow > $max){
$r = $oh/$ow;
$new_h = ($oh > $ow) ? $max : $max*$r;
$new_w = $new_h/$r;
}
// note TrueColor does 256 and not.. 8
$dst_img = imagecreatetruecolor($new_w,$new_h);
imagecopyresampled($dst_img, $src_img, 0,0,0,0, $new_w, $new_h, ImageSX($src_img), ImageSY($src_img));
imagejpeg($dst_img, $picture, 75);
}
}
attualmente funzia solo con le jpg ma in futuro chissà.
cmq con questa dovrebbe andare
però certo questa funzione se gli passi l'img ti fa il resize ma poi senza fopen non la scrivi sul db.
cmq picchia l'amministratore del server