ImageSharpen()

Sharpens an image by using the unsharp mask filter.

Requires Extension: Image extension

ImageSharpen( image=any, gain=number );

Returns: void

Argument Description Default
image
any, required

The image on which this operation is performed.

Alias: name

gain
number, optional

Gain values can be integers or real numbers. The default value is 1.0. The value determines whether the image is blurred or sharpened:

  • if > 0, the image is sharpened
  • if = 0, no effect
  • if < 0, the image is blurred

1

Examples

img=imageRead("https://avatars1.githubusercontent.com/u/10973141?s=280&v=4");
imageSharpen(img,2);
cfimage(action="writeToBrowser",source=img);

See also