Imagick::spreadImage
PHP function
Edit on GitHub ✎
(PECL imagick 2, PECL imagick 3)
Randomly displaces each pixel in a block
Description
Imagick::spreadImage(float $radius): bool
Special effects method that randomly displaces each pixel in a block defined by the radius parameter.
Parameters
radius
Return Values
Success
Errors/Exceptions
Throws
Examples
php
<?php
function spreadImage($imagePath, $radius) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->spreadImage($radius);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>