Enum LayerEffectsTypes

LayerEffectsTypes enumeration

レイヤーブレンド効果.

public enum LayerEffectsTypes

名前価値説明
DropShadow0ドロップ シャドウ。
OuterGlow1外側のグロー.
PatternOverlay2パターンオーバーレイ.
GradientOverlay3グラデーション オーバーレイ。
ColorOverlay4カラーオーバーレイ.
Satin5サテン効果タイプ.
InnerGlow6内側の輝き.
InnerShadow7内側の影。
Stroke8ストローク.
BevelEmboss9ベベルエンボス.

次のコードは、ILayerEffect.EffectType プロパティのサポートを示しています。

[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)
        {
            // キャッチした
            psdImage.Save(outputWith, new PngOptions());
        }
    }
}

関連項目