PaletteOptimiser

Change of optimiser.py

2:ed365be00a60
optimiser.py
     1.1 --- a/optimiser.py	Tue Sep 08 19:52:24 2015 +0200
     1.2 +++ b/optimiser.py	Tue Sep 08 19:57:35 2015 +0200
     1.3 @@ -121,8 +121,8 @@
     1.4  
     1.5      chosen = []
     1.6  
     1.7 -    light = True
     1.8 -    for u, bu in zip(usage, base_usage):
     1.9 +    for row, (u, bu) in enumerate(zip(usage, base_usage)):
    1.10 +        light = row % 2
    1.11          best = 0
    1.12          best_bases = None
    1.13          best_missing = None
    1.14 @@ -144,11 +144,11 @@
    1.15                  best_map = tone_map
    1.16                  best = count
    1.17          chosen.append((best, best_bases or bases, best_map or tone_map, best_missing or missing))
    1.18 -        light = not light
    1.19  
    1.20      output = []
    1.21  
    1.22      for row, (tr, ch) in enumerate(zip(toned, chosen)):
    1.23 +        light = row % 2
    1.24          o = []
    1.25          for column, t in enumerate(tr):
    1.26              best, bases, tone_map, missing = ch