VibranceLayer.Saturation

VibranceLayer.Saturation property

Gets or sets the saturation.

public int Saturation { get; set; }

Property Value

The saturation.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionSaturation must be in range from -100 to +100

Examples

The following code example demonstrates support of the VibranceLayer layer and the ability to edit this adjustment.

[C#]

string sourceFileName = "WithoutVibrance.psd";
string outputFileNamePsd = "out_VibranceLayer.psd";
string outputFileNamePng = "out_VibranceLayer.png";

using (PsdImage image = (PsdImage) Image.Load(sourceFileName))
{
    // Creating a new VibranceLayer
    VibranceLayer vibranceLayer = image.AddVibranceAdjustmentLayer();
    vibranceLayer.Vibrance = 50;
    vibranceLayer.Saturation = 100;

    image.Save(outputFileNamePsd);
    image.Save(outputFileNamePng, new PngOptions());
}

See Also