src/Manipulators/Crop.php
public function run(Image $image)
    {
        $coordinates = $this->getCoordinates($image);

        if ($coordinates) {
            $coordinates = $this->limitToImageBoundaries($image, $coordinates);

            $image->crop(
                $coordinates[0],
                $coordinates[1],
                $coordinates[2],
                $coordinates[3]
            );
        }

        return $image;
    }
public function run(Image $image)
    {
        $coordinates = $this->getCoordinates($image);

        if ($coordinates) {
            $coordinates = $this->limitToImageBoundaries($image, $coordinates);

            $image->crop(
                $coordinates[0],
                $coordinates[1],
                $coordinates[2],
                $coordinates[3]
            );
        }

        return $image;
    }
public function run ( Image $ image ) { $ coordinates = $ this -> getCoordinates ( $ image ) ; if ( $ coordinates ) { $ coordinates = $ this -> limitToImageBoundaries ( $ image , $ coordinates ) ; $ image -> crop ( $ coordinates [ 0 ] , $ coordinates [ 1 ] , $ coordinates [ 2 ] , $ coordinates [ 3 ] ) ; } return $ image ; }
Perform crop image manipulation.
@param  Image $image The source image.
@return Image The manipulated image.
Perform crop image manipulation .