Method SetEffectProperties
- Namespace
- PaintDotNet.Effects.Gpu
- Assembly
- PaintDotNet.Effects.Gpu.dll
SetEffectProperties(PdnLevelsEffect, IHistogramData, float, float)
Sets the properties of a PdnLevelsEffect to perform auto-leveling. This method will produce the same values and output as using Paint.NET's built-in Auto-Level adjustment.
public static void SetEffectProperties(PdnLevelsEffect levelsEffect, IHistogramData histogram, float blackPointPercentile = 0.005, float whitePointPercentile = 0.995)
Parameters
levelsEffectPdnLevelsEffectThe effect to set properties on.
histogramIHistogramDataA histogram of the image, created with HistogramEffect2.
blackPointPercentilefloatThe percentile to use for black point calculation.
whitePointPercentilefloatThe percentile to use for white point calculation.