Adds blur filter to image. Optional third parameter to blur a specific channel.
Touch/mouse over to see original View modified in new window.
Image
Radius
Sigma
Channel
Adds blur filter to image. Optional third parameter to blur a specific channel.
Parameters
radiusfloatBlur radius
sigmafloatStandard deviation
channelintThe Channeltype constant. When not supplied, all channels are blurred.
function blurImage($imagePath, $radius, $sigma, $channel)
{
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->blurImage($radius, $sigma, $channel);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}