| ColorBalanceAdjustmentLayerMidtonesCyanRedBalance Property |
Gets or sets the Midtones Cyan Red Balance.
Namespace: Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayersAssembly: Aspose.PSD (in Aspose.PSD.dll) Version: 23.4
Syntaxpublic short MidtonesCyanRedBalance { get; set; }Public Property MidtonesCyanRedBalance As Short
Get
Set
public:
property short MidtonesCyanRedBalance {
short get ();
void set (short value);
}member MidtonesCyanRedBalance : int16 with get, set
Property Value
Type:
Int16
The Midtones Cyan Red Balance.
Exceptions| Exception | Condition |
|---|
| ArgumentOutOfRangeException |
Midtones Cyan Red Balance must be in range from -100 to +100.
|
ExamplesThe following code demonstrates support for the ColorBalanceAdjustmentLayer.
[C#]
var filePath = "ColorBalance.psd";
var outputPath = "ColorBalance_out.psd";
using (var im = (PsdImage)Image.Load(filePath))
{
foreach (var layer in im.Layers)
{
var cbLayer = layer as ColorBalanceAdjustmentLayer;
if (cbLayer != null)
{
cbLayer.ShadowsCyanRedBalance = 30;
cbLayer.ShadowsMagentaGreenBalance = -15;
cbLayer.ShadowsYellowBlueBalance = 40;
cbLayer.MidtonesCyanRedBalance = -90;
cbLayer.MidtonesMagentaGreenBalance = -25;
cbLayer.MidtonesYellowBlueBalance = 20;
cbLayer.HighlightsCyanRedBalance = -30;
cbLayer.HighlightsMagentaGreenBalance = 67;
cbLayer.HighlightsYellowBlueBalance = -95;
cbLayer.PreserveLuminosity = true;
}
}
im.Save(outputPath);
}
See Also