hsl needs RGB images

This commit is contained in:
j 2011-02-08 12:43:38 +05:30
parent 3049c0185d
commit 478919c60a

View file

@ -52,7 +52,7 @@ def getImageHeat(image_file):
return image_heat / 256 return image_heat / 256
def getImageHSL(image_file): 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))) return getHSL(image.getpixel((0, 0)))
def getRGB(hsl): def getRGB(hsl):