public function resizeSource() : AbstractResize
    {
        if ($this->intermediate['maintain_aspect'] === true) {
            if ($this->source['aspect_ratio'] > 1.00) {
                $this->intermediateSizeLandscape();
            } else {
                if ($this->source['aspect_ratio'] === 1.00) {
                    $this->intermediateSizeSquare();
                } else {
                    $this->intermediateSizePortrait();
                }
            }
        } else {
            $this->intermediate['width'] = $this->canvas['width'];
            $this->intermediate['height'] = $this->canvas['height'];
        }

        $this->canvasSpacingX();
        $this->canvasSpacingY();

        $this->processed = true;

        return $this;
    }
public function resizeSource() : AbstractResize
    {
        if ($this->intermediate['maintain_aspect'] === true) {
            if ($this->source['aspect_ratio'] > 1.00) {
                $this->intermediateSizeLandscape();
            } else {
                if ($this->source['aspect_ratio'] === 1.00) {
                    $this->intermediateSizeSquare();
                } else {
                    $this->intermediateSizePortrait();
                }
            }
        } else {
            $this->intermediate['width'] = $this->canvas['width'];
            $this->intermediate['height'] = $this->canvas['height'];
        }

        $this->canvasSpacingX();
        $this->canvasSpacingY();

        $this->processed = true;

        return $this;
    }
public function resizeSource ( ) : AbstractResize { if ( $ this -> intermediate [ 'maintain_aspect' ] === true ) { if ( $ this -> source [ 'aspect_ratio' ] > 1.00 ) { $ this -> intermediateSizeLandscape ( ) ; } else { if ( $ this -> source [ 'aspect_ratio' ] === 1.00 ) { $ this -> intermediateSizeSquare ( ) ; } else { $ this -> intermediateSizePortrait ( ) ; } } } else { $ this -> intermediate [ 'width' ] = $ this -> canvas [ 'width' ] ; $ this -> intermediate [ 'height' ] = $ this -> canvas [ 'height' ] ; } $ this -> canvasSpacingX ( ) ; $ this -> canvasSpacingY ( ) ; $ this -> processed = true ; return $ this ; }
Process the request, generate the size required for the image along with the
canvas spacing

@return AbstractResize
@throws \Exception Throws an exception if unable to create image
Process the request generate the size required for the image along with the canvas spacing