Skip to content

Commit

Permalink
Update GilbertCurve.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcychan authored Aug 28, 2024
1 parent ec5890f commit de88c02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nQuant.Master/GilbertCurve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private GilbertCurve(int width, int height, int[] pixels, Color[] palette, int[]
errorq = new();
weight = Math.Abs(weight);
margin = weight < .0025 ? 12 : 6;
sortedByYDiff = !hasAlpha && palette.Length >= 128 && weight >= .04;
sortedByYDiff = !hasAlpha && saliencies != null && palette.Length >= 128 && weight >= .052;
DITHER_MAX = (byte)(weight < .01 ? (weight > .0025) ? 25 : 16 : 9);
var edge = hasAlpha ? 1 : Math.Exp(weight) + .25;
var deviation = weight > .002 ? .25 : 1;
Expand Down

0 comments on commit de88c02

Please sign in to comment.