così dovrebbe andare:

Codice PHP:
<?PHP 

class Image

    var 
$src_filename

    var 
$src_width

    var 
$src_height

    var 
$src_type

    var 
$src_attr

    var 
$src_image

    var 
$final_width;
    var 
$final_height;  



    function 
Image($filename){ 

        
$this->src_filename $filename

        
$this->GetImageInfo(); 

    } 



    function 
GetImageInfo(){ 

        list(
$this->src_width,$this->src_height$this->src_type$this->src_attr) = getimagesize($this->src_filename); 

    } 



    function 
CreateSourceImage(){ 

        switch(
$this->src_type){ 

            case 
1

                
$this->src_image =imagecreatefromgif($this->src_filename); 

                   break; 

            case 
2

                
$this->src_image =imagecreatefromjpeg($this->src_filename); 

            break; 

            case 
3

                
$this->src_image =imagecreatefrompng($this->src_filename); 

            break; 

            default:    return 
false

        } 



        return 
true

    } 



    function 
SaveProportionateImage($filename$quality$height){ 

        
$dest_height $height

        
$ratio $this->src_height $dest_height

        
// Salvo del dimensioni finali dell'immagine
        
$this->final_width $this->src_width $ratio;
        
$this->final_height $this->src_height $ratio;

        
$dest_image imagecreatetruecolor$this->src_width $ratio,$dest_height); 

        
imagecopyresampled($dest_image$this->src_image0000

            
$this->final_width

            
$this->final_height

            
$this->src_width

            
$this->src_height); 

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

        
imagedestroy($dest_image); 

    } 



    function 
Free(){ 

        
imagedestroy($this->src_image); 

    } 



?>
e nella tua pagina per recuperare i valori metti
Codice PHP:
echo "Larghezza finale: "$img->final_width;
echo 
"\nAltezza  finale: "$img->final_height

ciauz