Table of Contents

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 PdnLevelsEffect

The effect to set properties on.

histogram IHistogramData

A histogram of the image, created with HistogramEffect2.

blackPointPercentile float

The percentile to use for black point calculation.

whitePointPercentile float

The percentile to use for white point calculation.