function imageapi_image_sharpen in ImageAPI 6
Same name and namespace in other branches
- 5 imageapi.module \imageapi_image_sharpen()
Sharpen an image given some sharpening parameters.
NOTE: These parameters only have an effect when Imagemagick is used. GD will used a fixed convolution matrix as described in imageapi_gd.module
Parameters
$image: An imageapi image object returned by imageapi_image_open().
$radius: The radius of the gaussian, in pixels, not counting the center pixel. (default 0.5)
$sigma: The standard deviation of the gaussian, in pixels. (default 0.5)
$amount: The percentage of the difference between the original and the blur image that is added back into the original. (default 100)
$threshold: The threshold, as a fraction of max RGB levels, needed to apply the difference amount. (default 0.05)
Return value
True or FALSE, based on success.
File
- ./
imageapi.module, line 309 - An ImageAPI supporting additional image plugins as modules. Images are treated as objects, and images are not written per manipulation as Drupal's core image handling works.
Code
function imageapi_image_sharpen(&$image, $radius, $sigma, $amount, $threshold) {
return imageapi_toolkit_invoke('sharpen', $image, array(
$radius,
$sigma,
$amount,
$threshold,
));
}