function image_imagemagick_blur in ImageCache Actions 7
Same name and namespace in other branches
- 8 canvasactions/canvasactions.inc \image_imagemagick_blur()
Imagemagick toolkit specific implementation of the blur effect.
See http://www.imagemagick.org/Usage/blur/.
Parameters
stdClass $image:
int $intensity: The "intensity" of the blur effect.
Return value
boolean True on success, false otherwise.
File
- canvasactions/
canvasactions.inc, line 1184
Code
function image_imagemagick_blur(stdClass $image, $intensity) {
// To get similar results asd with the GD factor, we use a formula to alter
// the intensity into the sigma value that is passed to IM.
$sigma = 4.0 + 0.8 * $intensity;
$image->ops[] = '-blur ' . escapeshellarg(sprintf('0x%f', $sigma));
return TRUE;
}