src/Sulu/Bundle/MediaBundle/Media/ImageConverter/ImagineImageConverter.php
private function applyFormatCrop(ImageInterface $image, array $cropParameters)
    {
        return $this->modifyAllLayers(
            $image,
            function(ImageInterface $layer) use ($cropParameters) {
                return $this->cropper->crop(
                    $layer,
                    $cropParameters['x'],
                    $cropParameters['y'],
                    $cropParameters['width'],
                    $cropParameters['height']
                );
            }
        );
    }
private function applyFormatCrop(ImageInterface $image, array $cropParameters)
    {
        return $this->modifyAllLayers(
            $image,
            function(ImageInterface $layer) use ($cropParameters) {
                return $this->cropper->crop(
                    $layer,
                    $cropParameters['x'],
                    $cropParameters['y'],
                    $cropParameters['width'],
                    $cropParameters['height']
                );
            }
        );
    }
private function applyFormatCrop ( ImageInterface $ image , array $ cropParameters ) { return $ this -> modifyAllLayers ( $ image , function ( ImageInterface $ layer ) use ( $ cropParameters ) { return $ this -> cropper -> crop ( $ layer , $ cropParameters [ 'x' ] , $ cropParameters [ 'y' ] , $ cropParameters [ 'width' ] , $ cropParameters [ 'height' ] ) ; } ) ; }
Crops a given image according to given parameters.

@param ImageInterface $image The image to crop
@param array $cropParameters The parameters which define the area to crop

@return ImageInterface The cropped image
Crops a given image according to given parameters .