Efectos de sombra en archivo PSD

Efecto de sombra interior

Using Aspose.PSD para .NET, developers can set inner shadow effects on different elements. The Sombra interna effect is used to add a diffused shadow to the inside of an object and to adjust its color, offset and blur.

Below is the code demonstration of the said functionality.

// For complete examples and data files, please go to https://github.com/aspose-psd/Aspose.PSD-for-.NET
string destName = dataDir + "innershadow_out.psd";
var loadOptions = new PsdLoadOptions()
{
LoadEffectsResource = true
};
// Load an existing image into an instance of PsdImage class
using (var image = (PsdImage)Image.Load(sourceFile, loadOptions))
{
var layer = image.Layers[image.Layers.Length - 1];
var shadowEffect = (IShadowEffect)layer.BlendingOptions.Effects[0];
shadowEffect.Color = Color.Green;
shadowEffect.Opacity = 128;
shadowEffect.Distance = 1;
shadowEffect.UseGlobalLight = false;
shadowEffect.Size = 2;
shadowEffect.Angle = 45;
shadowEffect.Spread = 50;
shadowEffect.Noise = 5;
image.Save(destName, new PsdOptions(image));
}