PosterizeLayer.Levels

PosterizeLayer.Levels property

Levels of Posterize layer.

public short Levels { get; set; }

Examples

The following code demonstrates the support of PosterizeLayer.

[C#]

string sourceFile = "zendeya_posterize.psd";
string outputFile = "zendeya_posterize_10.psd";

using (var image = (PsdImage)Image.Load(sourceFile, new PsdLoadOptions()))
{
    foreach (Layer layer in image.Layers)
    {
        if (layer is PosterizeLayer)
        {
            ((PosterizeLayer)layer).Levels = 10;
            image.Save(outputFile);

            break;
        }
    }
}

See Also