Search Results for

    Show / Hide Table of Contents

    Class UnsharpMaskSettings

    Defines settings for an Unsharp Masking operation.

    Inheritance
    System.Object
    UnsharpMaskSettings
    Namespace: PhotoSauce.MagicScaler
    Assembly: PhotoSauce.MagicScaler.dll
    Syntax
    public sealed class UnsharpMaskSettings : ValueType
    Remarks

    These settings are designed to function similarly to the Unsharp Mask settings in Photoshop.

    Constructors

    UnsharpMaskSettings(Int32, Double, Byte)

    Constructs a new UnsharpMaskSettings instance with the specified values.

    Declaration
    public UnsharpMaskSettings(int amount, double radius, byte threshold)
    Parameters
    Type Name Description
    System.Int32 amount

    The amount of sharpening.

    System.Double radius

    The blur radius.

    System.Byte threshold

    The minimum change required for a pixel to be filtered.

    Fields

    None

    No sharpening.

    Declaration
    public static readonly UnsharpMaskSettings None
    Field Value
    Type Description
    UnsharpMaskSettings

    Properties

    Amount

    The amount of sharpening. This value represents a percentage of the difference between the blurred image and the original image.

    Declaration
    public int Amount { get; }
    Property Value
    Type Description
    System.Int32

    Typical values are between 25 and 200.

    Radius

    The radius (sigma) of the gaussian blur used for the mask. This value determines the size of details that are sharpened.

    Declaration
    public double Radius { get; }
    Property Value
    Type Description
    System.Double

    Typical values are between 0.3 and 3.0. Larger radius values can have significant performance cost.

    Threshold

    The minimum brightness change required for a pixel to be modified by the filter.

    Declaration
    public byte Threshold { get; }
    Property Value
    Type Description
    System.Byte

    Typical values are between 0 and 10.

    Remarks

    When using larger Radius or Amount values, a larger Threshold value can ensure lines are sharpened while textures are not.

    In This Article
    Back to top Copyright © 2022 Clinton Ingram
    Generated with DocFX