summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-06 23:03:43 +0100
committerubq323 <ubq323@ubq323.website>2022-08-06 23:03:43 +0100
commit75736b9dcd5130965d73aa0a0b29e5155c39e3a0 (patch)
tree8d8b5ad63f4b1fe2b0a09943c0ee8947254b4658
parent5ae6918c295a04c86737b050855fb0f0fcf0185b (diff)
img
-rw-r--r--img/better_disp.lua4
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