private function blur(array $params, $adaptive = false) {
        $this->checkRequiredParams($params, ['radius', 'sigma']);

        $radius = (float) $params['radius'];
        $sigma = (float) $params['sigma'];

        try {
            if ($adaptive) {
                $this->imagick->adaptiveBlurImage($radius, $sigma);
            } else {
                $this->imagick->gaussianBlurImage($radius, $sigma);
            }
        } catch (ImagickException $e) {
            throw new TransformationException($e->getMessage(), 400, $e);
        }

        $this->image->hasBeenTransformed(true);
    }
private function blur(array $params, $adaptive = false) {
        $this->checkRequiredParams($params, ['radius', 'sigma']);

        $radius = (float) $params['radius'];
        $sigma = (float) $params['sigma'];

        try {
            if ($adaptive) {
                $this->imagick->adaptiveBlurImage($radius, $sigma);
            } else {
                $this->imagick->gaussianBlurImage($radius, $sigma);
            }
        } catch (ImagickException $e) {
            throw new TransformationException($e->getMessage(), 400, $e);
        }

        $this->image->hasBeenTransformed(true);
    }
private function blur ( array $ params , $ adaptive = false ) { $ this -> checkRequiredParams ( $ params , [ 'radius' , 'sigma' ] ) ; $ radius = ( float ) $ params [ 'radius' ] ; $ sigma = ( float ) $ params [ 'sigma' ] ; try { if ( $ adaptive ) { $ this -> imagick -> adaptiveBlurImage ( $ radius , $ sigma ) ; } else { $ this -> imagick -> gaussianBlurImage ( $ radius , $ sigma ) ; } } catch ( ImagickException $ e ) { throw new TransformationException ( $ e -> getMessage ( ) , 400 , $ e ) ; } $ this -> image -> hasBeenTransformed ( true ) ; }
Add Gaussian or adaptive blur to the image

@param array $params The transformation parameters
@param bool $adaptive Perform adaptive blur or not
Add Gaussian or adaptive blur to the image