function image_gd_blur in ImageCache Actions 7
Same name and namespace in other branches
- 8 canvasactions/canvasactions.inc \image_gd_blur()
GD toolkit specific implementation of the blur effect.
Parameters
stdClass $image:
int $intensity: The number of times to apply the blur filter.
Return value
boolean True on success, false otherwise.
File
- canvasactions/
canvasactions.inc, line 1162
Code
function image_gd_blur(stdClass $image, $intensity) {
$intensity = (int) $intensity;
$result = TRUE;
$i = 0;
while ($result && $i++ < $intensity) {
$result = imagefilter($image->resource, IMG_FILTER_GAUSSIAN_BLUR);
}
return $result;
}