Layer.BlendModeKey
Layer.BlendModeKey property
ब्लेंड मोड कुंजी प्राप्त या सेट करता है।
public virtual BlendMode BlendModeKey { get; set; }
संपत्ति मूल्य
ब्लेंड मोड कुंजी.
उदाहरण
निम्न उदाहरण दर्शाता है कि आप Aspose.PSD में PassThrough लेयर ब्लेंड मोड का उपयोग कैसे कर सकते हैं
[C#]
string sourceFileName = "Apple.psd";
string outputFileName = "OutputApple";
using (PsdImage image = (PsdImage)Image.Load(sourceFileName))
{
if (image.Layers.Length < 23)
{
throw new Exception("There is not 23rd layer.");
}
var layer = image.Layers[23] as LayerGroup;
if (layer == null)
{
throw new Exception("The 23rd layer is not a layer group.");
}
if (layer.Name != "AdjustmentGroup")
{
throw new Exception("The 23rd layer name is not 'AdjustmentGroup'.");
}
if (layer.BlendModeKey != BlendMode.PassThrough)
{
throw new Exception("AdjustmentGroup layer should have 'pass through' blend mode.");
}
image.Save(outputFileName + ".psd", new PsdOptions(image));
image.Save(outputFileName + ".png", new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
layer.BlendModeKey = BlendMode.Normal;
image.Save(outputFileName + "Normal.psd", new PsdOptions(image));
image.Save(outputFileName + "Normal.png", new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
}
यह सभी देखें
- enum BlendMode
- class Layer
- नाम स्थान Aspose.PSD.FileFormats.Psd.Layers
- सभा Aspose.PSD