Browse Source

Remove empty histograms

pull/1552/head
Brian Popow 6 years ago
parent
commit
f5d7d2c71a
  1. 2
      src/ImageSharp/Formats/WebP/Lossless/HistogramEncoder.cs

2
src/ImageSharp/Formats/WebP/Lossless/HistogramEncoder.cs

@ -68,9 +68,11 @@ namespace SixLabors.ImageSharp.Formats.WebP.Lossless
// Cubic ramp between 1 and MaxHistoGreedy:
int thresholdSize = (int)(1 + (x * x * x * (MaxHistoGreedy - 1)));
RemoveEmptyHistograms(imageHisto);
bool doGreedy = HistogramCombineStochastic(imageHisto, thresholdSize);
if (doGreedy)
{
RemoveEmptyHistograms(imageHisto);
HistogramCombineGreedy(imageHisto);
}

Loading…
Cancel
Save