From 478919c60a280ff02aff2c2a5e0fc74a5b5273e0 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 8 Feb 2011 12:43:38 +0530 Subject: [PATCH] hsl needs RGB images --- ox/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox/image.py b/ox/image.py index 82260f0..dd1e91e 100644 --- a/ox/image.py +++ b/ox/image.py @@ -52,7 +52,7 @@ def getImageHeat(image_file): return image_heat / 256 def getImageHSL(image_file): - image = Image.open(image_file).resize((1, 1), Image.ANTIALIAS) + image = Image.open(image_file).convert('RGB').resize((1, 1), Image.ANTIALIAS) return getHSL(image.getpixel((0, 0))) def getRGB(hsl):