function ScaleDown($maxSize)
    {
        
        $height = $this->Height();
        $width = $this->Width();
        
        if ($width < $maxSize && $height < $maxSize)
            return;
        
        $xRatio = $maxSize / $height ;
        $yRatio = $maxSize / $width;
        
        $this->ScaleProportional(min($xRatio, $yRatio));
    }
function ScaleDown($maxSize)
    {
        
        $height = $this->Height();
        $width = $this->Width();
        
        if ($width < $maxSize && $height < $maxSize)
            return;
        
        $xRatio = $maxSize / $height ;
        $yRatio = $maxSize / $width;
        
        $this->ScaleProportional(min($xRatio, $yRatio));
    }
function ScaleDown ( $ maxSize ) { $ height = $ this -> Height ( ) ; $ width = $ this -> Width ( ) ; if ( $ width < $ maxSize && $ height < $ maxSize ) return ; $ xRatio = $ maxSize / $ height ; $ yRatio = $ maxSize / $ width ; $ this -> ScaleProportional ( min ( $ xRatio , $ yRatio ) ) ; }
Scales down with fixed relation to the max size in height and width; If image is smaller, nothing is done.
@param int $maxSize The max width and height the image shall be given
Scales down with fixed relation to the max size in height and width ; If image is smaller nothing is done .