SimpleImage::blur PHP Method

blur() public method

Blur
public blur ( string $type = 'selective', integer $passes = 1 ) : SimpleImage
$type string selective|gaussian
$passes integer Number of times to apply the filter
return SimpleImage
    function blur($type = 'selective', $passes = 1)
    {
        switch (strtolower($type)) {
            case 'gaussian':
                $type = IMG_FILTER_GAUSSIAN_BLUR;
                break;
            default:
                $type = IMG_FILTER_SELECTIVE_BLUR;
                break;
        }
        for ($i = 0; $i < $passes; $i++) {
            imagefilter($this->image, $type);
        }
        return $this;
    }