Class PsdFlattenOptions
Options for Flatten(PsdFlattenOptions?).
public sealed record PsdFlattenOptions : IEquatable<PsdFlattenOptions>
- Inheritance
-
PsdFlattenOptions
- Implements
- Inherited Members
Examples
// Flatten composites the layers as Photoshop does; change a layer's record first to flatten it differently.
using PsdDocument document = PsdImage.ReadLayers("layered.psd");
PsdLayerImage top = document.Layers[^1];
top.Info = top.Info with { IsVisible = false };
using Raster flat = document.Flatten();
foreach (EgamiDiagnostic warning in flat.Metadata.Warnings)
{
// What the flattening left out, such as noise gradients, one warning a kind naming the layers.
Console.WriteLine(warning.Message);
}
flat.Save("without-top.png");
Properties
ApplyAdjustments
Gets a value indicating whether the adjustment layers Egami knows (levels, curves, hue/saturation, brightness/contrast and invert) change the layers under them. On by default; off leaves every adjustment layer out, without a warning.
public bool ApplyAdjustments { get; init; }
Property Value
ApplyEffects
Gets a value indicating whether layer effects (layer styles: drop and inner shadows, outer and inner glows, bevel and emboss, satin, color, gradient and pattern overlays, and strokes) are drawn around and over their layers. On by default; off leaves every effect out, without a warning, and draws the layers as they are.
public bool ApplyEffects { get; init; }
Property Value
Default
Gets the default options.
public static PsdFlattenOptions Default { get; }