Heat expects RGB image

This commit is contained in:
j 2011-11-07 22:51:40 +01:00
parent cb8ebbe74a
commit 2a04bb8a74

View file

@ -37,7 +37,7 @@ def getHSL(rgb):
return tuple(hsl)
def getImageHeat(image_file):
image = Image.open(image_file).resize((16, 16), Image.ANTIALIAS)
image = Image.open(image_file).convert('RGB').resize((16, 16), Image.ANTIALIAS)
pixel = image.load()
image_heat = 0
for y in range(image.size[1]):