imageSharpen

Sharpens a ColdFusion image by using the unsharp mask filter.

imageSharpen(name [, gain]) → returns void

Member Function Syntax

someImage.sharpen(gain)

Argument Reference

name string
Required

The image on which this operation is performed.

gain numeric
Default: 1.0

Gain values can be integers or real numbers.
Values:
  • > 0: the image is sharpened.
  • = 0: no effect
  • < 0: the image is blurred.

Examples
Sample code invoking the imageSharpen function

CF 11+ Lucee 4.5+ Sharpen an image

imgObj = imageRead("http://cfdocs.org/apple-touch-icon.png");
imgObj.sharpen(2);
cfimage(action="writeToBrowser", source=imgObj);

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub