src/Manipulators/Size.php
public function runResize(Image $image, $fit, $width, $height)
    {
        if ($fit === 'contain') {
            return $this->runContainResize($image, $width, $height);
        }

        if ($fit === 'fill') {
            return $this->runFillResize($image, $width, $height);
        }

        if ($fit === 'max') {
            return $this->runMaxResize($image, $width, $height);
        }

        if ($fit === 'stretch') {
            return $this->runStretchResize($image, $width, $height);
        }

        if ($fit === 'crop') {
            return $this->runCropResize($image, $width, $height);
        }

        return $image;
    }
public function runResize(Image $image, $fit, $width, $height)
    {
        if ($fit === 'contain') {
            return $this->runContainResize($image, $width, $height);
        }

        if ($fit === 'fill') {
            return $this->runFillResize($image, $width, $height);
        }

        if ($fit === 'max') {
            return $this->runMaxResize($image, $width, $height);
        }

        if ($fit === 'stretch') {
            return $this->runStretchResize($image, $width, $height);
        }

        if ($fit === 'crop') {
            return $this->runCropResize($image, $width, $height);
        }

        return $image;
    }
public function runResize ( Image $ image , $ fit , $ width , $ height ) { if ( $ fit === 'contain' ) { return $ this -> runContainResize ( $ image , $ width , $ height ) ; } if ( $ fit === 'fill' ) { return $ this -> runFillResize ( $ image , $ width , $ height ) ; } if ( $ fit === 'max' ) { return $ this -> runMaxResize ( $ image , $ width , $ height ) ; } if ( $ fit === 'stretch' ) { return $ this -> runStretchResize ( $ image , $ width , $ height ) ; } if ( $ fit === 'crop' ) { return $ this -> runCropResize ( $ image , $ width , $ height ) ; } return $ image ; }
Perform resize image manipulation.
@param  Image   $image  The source image.
@param  string  $fit    The fit.
@param  integer $width  The width.
@param  integer $height The height.
@return Image   The manipulated image.
Perform resize image manipulation .