Special effects method that randomly displaces each pixel in a block defined by the radius parameter.
Touch/mouse over to see original View modified in new window.
Image
Radius
Special effects method that randomly displaces each pixel in a block defined by the radius parameter.
Parameters
radiusfloat
function spreadImage($imagePath, $radius)
{
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->spreadImage($radius);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}