src/Sulu/Bundle/MediaBundle/Media/ImageConverter/ImagineImageConverter.php
private function applyFocus(ImageInterface $image, FileVersion $fileVersion, array $scale)
    {
        return $this->modifyAllLayers(
            $image,
            function(ImageInterface $layer) use ($fileVersion, $scale) {
                return $this->focus->focus(
                    $layer,
                    $fileVersion->getFocusPointX(),
                    $fileVersion->getFocusPointY(),
                    $scale['x'],
                    $scale['y']
                );
            }
        );
    }
private function applyFocus(ImageInterface $image, FileVersion $fileVersion, array $scale)
    {
        return $this->modifyAllLayers(
            $image,
            function(ImageInterface $layer) use ($fileVersion, $scale) {
                return $this->focus->focus(
                    $layer,
                    $fileVersion->getFocusPointX(),
                    $fileVersion->getFocusPointY(),
                    $scale['x'],
                    $scale['y']
                );
            }
        );
    }
private function applyFocus ( ImageInterface $ image , FileVersion $ fileVersion , array $ scale ) { return $ this -> modifyAllLayers ( $ image , function ( ImageInterface $ layer ) use ( $ fileVersion , $ scale ) { return $ this -> focus -> focus ( $ layer , $ fileVersion -> getFocusPointX ( ) , $ fileVersion -> getFocusPointY ( ) , $ scale [ 'x' ] , $ scale [ 'y' ] ) ; } ) ; }
Crops the given image according to the focus point defined in the file version.

@param ImageInterface $image
@param FileVersion $fileVersion
@param array $scale

@return ImageInterface
Crops the given image according to the focus point defined in the file version .