Reduces the speckle noise in an image while preserving the edges of the original image.
Touch/mouse over to see original View modified in new window.
Image
Reduces the speckle noise in an image while preserving the edges of the original image.
function despeckleImage($imagePath)
{
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->despeckleImage();
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}