protected function intermediateSizePortrait()
    {
        // Set height and then calculate width
        $this->intermediate['height'] = $this->canvas['height'];
        $this->intermediate['width'] = intval(round(
            $this->intermediate['height'] * $this->source['aspect_ratio'], 0));

        // If width larger than requested, set and calculate new height
        if ($this->intermediate['width'] > $this->canvas['width']) {
            $this->intermediate['width'] = $this->canvas['width'];
            $this->intermediate['height'] = intval(round(
                $this->intermediate['width'] / $this->source['aspect_ratio'], 0));
        }
    }
protected function intermediateSizePortrait()
    {
        // Set height and then calculate width
        $this->intermediate['height'] = $this->canvas['height'];
        $this->intermediate['width'] = intval(round(
            $this->intermediate['height'] * $this->source['aspect_ratio'], 0));

        // If width larger than requested, set and calculate new height
        if ($this->intermediate['width'] > $this->canvas['width']) {
            $this->intermediate['width'] = $this->canvas['width'];
            $this->intermediate['height'] = intval(round(
                $this->intermediate['width'] / $this->source['aspect_ratio'], 0));
        }
    }
protected function intermediateSizePortrait ( ) { // Set height and then calculate width $ this -> intermediate [ 'height' ] = $ this -> canvas [ 'height' ] ; $ this -> intermediate [ 'width' ] = intval ( round ( $ this -> intermediate [ 'height' ] * $ this -> source [ 'aspect_ratio' ] , 0 ) ) ; // If width larger than requested, set and calculate new height if ( $ this -> intermediate [ 'width' ] > $ this -> canvas [ 'width' ] ) { $ this -> intermediate [ 'width' ] = $ this -> canvas [ 'width' ] ; $ this -> intermediate [ 'height' ] = intval ( round ( $ this -> intermediate [ 'width' ] / $ this -> source [ 'aspect_ratio' ] , 0 ) ) ; } }
The source image is portrait, maintaining aspect ratio calculate the intermediate
image height and width

@return void
The source image is portrait maintaining aspect ratio calculate the intermediate image height and width