Enum LayerEffectsTypes

LayerEffectsTypes enumeration

Layer blending effects.

public enum LayerEffectsTypes

Values

NameValueDescription
DropShadow0The drop shadow.
OuterGlow1The outer glow.
PatternOverlay2The pattern overlay.
GradientOverlay3The gradient overlay.
ColorOverlay4The color overlay.
Satin5The satin Effect Type.
InnerGlow6The inner glow.
InnerShadow7The inner shadow.
Stroke8The stroke.
BevelEmboss9The bevel emboss.

Examples

The following code demonstrates support of ILayerEffect.EffectType property.

[C#]

string inputFile = "input.psd";
string outputWithout = "outputWithout.png";
string outputWith = "outputWith.png";

using (PsdImage psdImage = (PsdImage)Image.Load(inputFile, new LoadOptions()))
{
    psdImage.Save(outputWithout, new PngOptions());

    Layer workLayer = psdImage.Layers[1];

    DropShadowEffect dropShadowEffect = workLayer.BlendingOptions.AddDropShadow();
    dropShadowEffect.Distance = 0;
    dropShadowEffect.Size = 8;
    dropShadowEffect.Opacity = 20;

    foreach (ILayerEffect iEffect in workLayer.BlendingOptions.Effects)
    {
        if (iEffect.EffectType == LayerEffectsTypes.DropShadow)
        {
            // it caught
            psdImage.Save(outputWith, new PngOptions());
        }
    }
}

See Also