Codice PHP:
    function SaveProportionateImage($filename$quality$height$width){ 

        
$dest_image imagecreatetruecolor$width ,$height); 

        
imagecopyresampled($dest_image$this->src_image0000

            
$width

            
$height

            
$this->src_width

            
$this->src_height); 

        
imagejpeg($dest_image$filename.'.jpg'$quality); 

        
imagedestroy($dest_image); 

    } 
Fatta al volo. Provala.