questa in neretto, esattamente.
Codice PHP:
$thumbsize=70;
$imgfile = "kw-temp/$fotoex";
list($width, $height) = getimagesize($imgfile);
$imgratio=$width/$height;
if ($imgratio>1){
$newwidth = $thumbsize;
$newheight = $thumbsize/$imgratio;}
else{
$newheight = $thumbsize;
$newwidth = $thumbsize*$imgratio;}
Codice PHP:
$thumb = ImageCreateTrueColor($newwidth,$newheight);
$source = imagecreatefromjpeg($imgfile);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagejpeg($thumb,"kw-img-utenti/kw-small/pic_$fotoex",75);
Cmq tornando, per aumentare la memoria di PHP devo agire lato server no?
Penso che questo problema sarà sempre + noto visto le fotocamere potentissime che ci ritroviamo ogni giorno migliori del giorno precedente..