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
levelsEffect
PdnLevelsEffectThe effect to set properties on.
histogram
IHistogramDataA histogram of the image, created with HistogramEffect2.
blackPointPercentile
floatThe percentile to use for black point calculation.
whitePointPercentile
floatThe percentile to use for white point calculation.