src/Manipulators/Size.php
public function runCropResize(Image $image, $width, $height)
    {
        list($resize_width, $resize_height) = $this->resolveCropResizeDimensions($image, $width, $height);

        $zoom = $this->getCrop()[2];

        $image->resize($resize_width * $zoom, $resize_height * $zoom, function ($constraint) {
            $constraint->aspectRatio();
        });

        list($offset_x, $offset_y) = $this->resolveCropOffset($image, $width, $height);

        return $image->crop($width, $height, $offset_x, $offset_y);
    }
public function runCropResize(Image $image, $width, $height)
    {
        list($resize_width, $resize_height) = $this->resolveCropResizeDimensions($image, $width, $height);

        $zoom = $this->getCrop()[2];

        $image->resize($resize_width * $zoom, $resize_height * $zoom, function ($constraint) {
            $constraint->aspectRatio();
        });

        list($offset_x, $offset_y) = $this->resolveCropOffset($image, $width, $height);

        return $image->crop($width, $height, $offset_x, $offset_y);
    }
public function runCropResize ( Image $ image , $ width , $ height ) { list ( $ resize_width , $ resize_height ) = $ this -> resolveCropResizeDimensions ( $ image , $ width , $ height ) ; $ zoom = $ this -> getCrop ( ) [ 2 ] ; $ image -> resize ( $ resize_width * $ zoom , $ resize_height * $ zoom , function ( $ constraint ) { $ constraint -> aspectRatio ( ) ; } ) ; list ( $ offset_x , $ offset_y ) = $ this -> resolveCropOffset ( $ image , $ width , $ height ) ; return $ image -> crop ( $ width , $ height , $ offset_x , $ offset_y ) ; }
Perform crop resize image manipulation.
@param  Image   $image  The source image.
@param  integer $width  The width.
@param  integer $height The height.
@return Image   The manipulated image.
Perform crop resize image manipulation .