From 71c19887c7e35edae203e7003e4131ed6ea91081 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 24 Mar 2023 13:19:31 -0700 Subject: [PATCH] wip --- dither-image.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dither-image.js b/dither-image.js index 618b884..1c00068 100644 --- a/dither-image.js +++ b/dither-image.js @@ -665,9 +665,11 @@ function decimate(input, palette, n) { //let rgb = bucket[bucket.length - 1]; // Take the luma-brightest color in the bucket + // wrong? bad //let rgb = bucket.slice().sort((a, b) => b.luma() - a.luma())[bucket.length - 1]; // Take the median color in the bucket + // bad //let rgb = bucket[bucket.length >> 1]; // Combine the brightest of each channel