PaletteOptimiser

Changeset

99:5e99d4b0e15f
2015-10-10 Paul Boddie raw files shortlog changelog graph Made the numeric types explicit, even if it is superfluous. simpleimage-shedskin
optimiserlib.py (file)
     1.1 --- a/optimiserlib.py	Sat Oct 10 19:12:46 2015 +0200
     1.2 +++ b/optimiserlib.py	Sat Oct 10 23:54:18 2015 +0200
     1.3 @@ -244,9 +244,9 @@
     1.4              for x in range(0, width):
     1.5                  rgb = im.getpixel((x, y))
     1.6                  if saturate or desaturate:
     1.7 -                    rgb = saturate_rgb(rgb, saturate and 0.5 / saturate or 2 * desaturate)
     1.8 +                    rgb = saturate_rgb(rgb, saturate and 0.5 / saturate or 2.0 * desaturate)
     1.9                  if darken or brighten:
    1.10 -                    rgb = amplify_rgb(rgb, brighten and 0.5 / brighten or 2 * darken)
    1.11 +                    rgb = amplify_rgb(rgb, brighten and 0.5 / brighten or 2.0 * darken)
    1.12                  im.putpixel((x, y), rgb)
    1.13  
    1.14  def preview_image(im, half_resolution_preview=False):