Lucee Function Reference

imagesharpen()

Enhances image clarity by applying an unsharp mask filter.
This technique works by:
1. Creating a blurred copy of the original image
2. Finding edges by comparing differences
3. Enhancing edge contrast where differences are found
*Note:* Despite the name "unsharp mask", this process actually increases sharpness.

Example

imagesharpen(any image,[number gain]):void

Category

image

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
image any  Yes   The source image to be sharpened. Can be:
  • An image object
  • A string containing the image path  
  • gain number  No 1 Controls the intensity of the sharpening effect:
  • **Positive values**: Increase sharpness
  • **Zero** (= 0): No effect
  • **Negative values**: Create blur effect
    *Typical range:* -10.0 to 10.0
    *Default value:* 1.0
    *Recommended:* Start with small values (0.5 - 2.0) for best results