Skip to content

Commit 2e2f150

Browse files
authored
Add files via upload
1 parent 503866b commit 2e2f150

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

nQuant.Master/GilbertCurve.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ private int DitherPixel(int x, int y, Color c2, float beta)
171171
kappa = beta * NormalDistribution(saliencies[bidx], weight < .0008 ? 2.5f : 1.75f);
172172
else if (palette.Length >= 32 || CIELABConvertor.Y_Diff(c1, c2) > (beta * Math.PI * acceptedDiff))
173173
{
174-
if (saliencies[bidx] < .9)
174+
if (saliencies[bidx] > .15 && saliencies[bidx] < .9)
175175
kappa = beta * (!sortedByYDiff && weight < .0025 ? .55f : .5f) / saliencies[bidx];
176176
else
177-
kappa = beta * NormalDistribution(beta, !sortedByYDiff && weight < .0025 ? .55f : .5f) / saliencies[bidx];
177+
kappa = beta * NormalDistribution(saliencies[bidx], weight < .0025 ? 1.82f : 2f);
178178
}
179179
}
180180

0 commit comments

Comments
 (0)