# HG changeset patch # User Paul Boddie # Date 1444174705 -7200 # Node ID 28240372e1d85b18de295248bcc6543d24531091 # Parent 96453447feab2a6fb521b95845d1a6e34c68a77f Reduced the propagated error by half. diff -r 96453447feab -r 28240372e1d8 optimiser.py --- a/optimiser.py Wed Oct 07 01:21:07 2015 +0200 +++ b/optimiser.py Wed Oct 07 01:38:25 2015 +0200 @@ -252,7 +252,7 @@ # Spread the error across adjacent pixels. - error = tuple(map(lambda i: (i[0] - i[1]) / 2.0, zip(rgb, value))) + error = tuple(map(lambda i: (i[0] - i[1]) / 4.0, zip(rgb, value))) for xn in range(x, min(x + 2, width)): rgbn = im.getpixel((xn, y+1)) rgbn = tuple(map(lambda i: clip(i[0] + i[1]), zip(rgbn, error)))