diff --git a/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistEqualizationProcessor.cs b/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistEqualizationProcessor.cs index 9b66d434ee..3d2ef02d52 100644 --- a/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistEqualizationProcessor.cs +++ b/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistEqualizationProcessor.cs @@ -169,8 +169,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization /// /// The histogram to apply the clipping. /// The histogram clip limit. Histogram bins which exceed this limit, will be capped at this value. - /// The number of pixels redistributed to all other bins. - private int ClipHistogram(Span histogram, int clipLimit) + private void ClipHistogram(Span histogram, int clipLimit) { int sumOverClip = 0; for (int i = 0; i < histogram.Length; i++) @@ -187,15 +186,6 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization { histogram[i] += addToEachBin; } - - // The redistribution will push some bins over the clip limit again. - // Re-Applying the clipping until this effect no longer occurs. - while (addToEachBin > 1) - { - addToEachBin = this.ClipHistogram(histogram, clipLimit); - } - - return addToEachBin; } ///