AddBlackWhiteAdjustmentLayer

PsdImage.AddBlackWhiteAdjustmentLayer method

Adds the black white adjustment layer.

public BlackWhiteAdjustmentLayer AddBlackWhiteAdjustmentLayer()

Return Value

The created black white adjustment layer.

Examples

The following example demonstrates how you can add the black white adjustment layer at runtime in Aspose.PSD

[C#]

string sourceFileName = "Stripes.psd";
string outputFileName = "OutputStripes.psd";
using (PsdImage image = (PsdImage)Image.Load(sourceFileName))
{
    BlackWhiteAdjustmentLayer newLayer = image.AddBlackWhiteAdjustmentLayer();
    newLayer.Name = "BlackWhiteAdjustmentLayer";
    newLayer.Reds = 22;
    newLayer.Yellows = 92;
    newLayer.Greens = 70;
    newLayer.Cyans = 79;
    newLayer.Blues = 7;
    newLayer.Magentas = 28;

    image.Save(outputFileName, new PsdOptions());
}

See Also