From 75736b9dcd5130965d73aa0a0b29e5155c39e3a0 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 6 Aug 2022 23:03:43 +0100 Subject: img --- img/better_disp.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'img') diff --git a/img/better_disp.lua b/img/better_disp.lua index 77b5aa0..b7125a9 100644 --- a/img/better_disp.lua +++ b/img/better_disp.lua @@ -31,7 +31,6 @@ local function all_palette_distances(R) out[ia] = {} for b = 0,15 do local ib=2^b - print(a,b,ia,ib) local ca = {R.getPaletteColor(ia)} local cb = {R.getPaletteColor(ib)} local dist = disp_common.color_dist(ca,cb) @@ -64,8 +63,11 @@ local function adjust_to_2_colors(R,gromlings,pdists) all_current_colors[cidx] = true ncolors = ncolors+1 end + + print(ncolors) while ncolors > 2 do + print(ncolors) -- merge closest two colors until there are only 2 distinct ones left local best_dist = 9999 local best_a = nil -- cgit v1.2.3