Class UnsharpMaskEffectAttribute
The UnsharpMaskEffect sharpens an image by first creating a blurred version of the image. For each pixel in the image, the difference between the original pixel value and the blurred pixel value is determined. If the difference in pixel values exceeds a threshold value, the original pixel value is modified, sharpening the image.
Inherited Members
Namespace: ImageVault.Client.Descriptors.Effects
Assembly: ImageVault.Client.dll
Syntax
public sealed class UnsharpMaskEffectAttribute : EffectAttribute
Constructors
UnsharpMaskEffectAttribute(Double, Int32, Int32, Int32)
Initializes a new instance of the UnsharpMaskEffectAttribute class.
Declaration
public UnsharpMaskEffectAttribute(double radius, int amount, int threshold, int sortOrder = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Double | radius | Radius |
System.Int32 | amount | Amount |
System.Int32 | threshold | Threshold |
System.Int32 | sortOrder | The order in which to apply the effect |
UnsharpMaskEffectAttribute(Int32)
Initializes a new instance of the UnsharpMaskEffectAttribute class.
Declaration
public UnsharpMaskEffectAttribute(int sortOrder = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | sortOrder |
Remarks
Properties
Amount
Defines the amount of sharpening to apply in pixels.
Declaration
public int Amount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
This is like a volume adjustment – the higher the percentage, the stronger the sharpening effect.
Typical setting: 50-200 %
Good starting point: 100 %
Radius
Defines the width of the sharpening effect in pixels
Declaration
public double Radius { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Remarks
Sharpening works on the edges of a subject by increasing the contrast at these points, making these outlines stand out more prominently. The higher the Radius amount, the stronger the sharpening effect. It’s measured in pixels, as this is the width of the sharpening effect.
Typical setting: 1-8 pixels
Good starting point: 1 pixel
Threshold
Defines the threshold level of the sharpening effect.
Declaration
public int Threshold { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The higher the threshold amount is set, the lower the sharpening effect. This value defines what counts as an edge for the sharpening applied by the Amount and Radius values. At '0 levels' each pixel counts as an edge, so it is sharpened. At high values (25 levels and above, for example) only high-contrast edges are sharpened.
Typical setting: 1-15 levels
Good starting point: 5 levels
Methods
CreateEffect()
Create the effect
Declaration
public override Effect CreateEffect()
Returns
Type | Description |
---|---|
Effect |