diff options
-rw-r--r-- | img/better_disp.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 |