se vuoi per il resize ti posso dare una mano

Codice PHP:
function resize($nomeimage$source_path$destination_path$par$quanto$new_width$new_height){
    list(
$width$height$type$attr) = getimagesize($source_path.$nomeimage);
    if(
$type==2){
        if(
$par=="w"){
            if(
$width $quanto){
                
$conv=$height/$width;
                
$new_width=$quanto;
                
$new_height=$conv*$new_width;
                
$new_height=number_format($new_height0);
            }else{
                
$new_width $width;
                
$new_height $height;
            }
        }else if(
$par=="h"){
            if(
$height $quanto){
                
$conv=$width/$height;
                
$new_height=$quanto;
                
$new_width=$conv*$new_height;
                
$new_width=number_format($new_width0);
            }else{
                
$new_width $width;
                
$new_height $height;
            }
        }
        
$compression=80;
        
$destimg=imagecreatetruecolor($new_width,$new_height) or die("Problemi nelle creazioni dell'immagine");
        
$srcimg=ImageCreateFromJPEG($source_path.$nomeimage) or die("Problemi nell'aprire l'immagine");
        
ImageCopyResampled($destimg,$srcimg,0,0,0,0,$new_width,$new_height,ImageSX($srcimg),ImageSY($srcimg)) or die("Problemi nel ridimensionamento");
        
ImageJPEG($destimg$destination_path.$nomeimage$compression) or die("Problemi nel salvataggio");
    }