Layer.IsVisible

Layer.IsVisible property

Gets or sets a value indicating whether the layer is visible

public bool IsVisible { get; set; }

Property Value

true if this instance is visible; otherwise, false.

Examples

The following example demonstrates how you can change LayerGroup visibility in Aspose.PSD

[C#]

string sourceFilePath = "input.psd";
string outputFilePath = "output.psd";

// make changes in layer names and save it
using (var image = (PsdImage)Image.Load(sourceFilePath))
{
    for (int i = 0; i < image.Layers.Length; i++)
    {
        var layer = image.Layers[i];

        // Turn off everything inside a group
        if (layer is LayerGroup)
        {
            layer.IsVisible = false;
        }
    }

    image.Save(outputFilePath);
}

See Also