From dcf5cd2edd6500ef581126265f87580910bd1fdc Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 20 Nov 2022 20:16:13 -0800 Subject: [PATCH] nice --- dither4.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dither4.js b/dither4.js index e487fdb..2654599 100644 --- a/dither4.js +++ b/dither4.js @@ -556,7 +556,7 @@ function decimate(input, palette, n) { if (i == pick) { return false; } - if (popularity[i] == 0) { + if (i > 0 && popularity[i] == 0) { return false; } return true; @@ -571,6 +571,10 @@ function decimate(input, palette, n) { console.log(`${delta}ms for line`); // Palette fits + if (decimated.length > 4) { + debugger; + } + console.log(decimated); return dither(decimated); }