diff --git a/ox/image.py b/ox/image.py index 0fad5eb..535b8dd 100644 --- a/ox/image.py +++ b/ox/image.py @@ -57,7 +57,7 @@ def getHSL(rgb): return tuple(hsl) def getImageHash(image_file, mode): - image = Image.open(image_file).convert('RGB').resize((8, 8), Image.ANTIALIAS) + image = Image.open(image_file).convert('RGB').resize((8, 8), Image.LANCZOS) image_hash = 0 if mode == 'color': # divide the image into 8 zones: @@ -99,7 +99,7 @@ def getImageHash(image_file, mode): return image_hash def getImageHeat(image_file): - image = Image.open(image_file).convert('RGB').resize((16, 16), Image.ANTIALIAS) + image = Image.open(image_file).convert('RGB').resize((16, 16), Image.LANCZOS) pixel = image.load() image_heat = 0 for y in range(image.size[1]): @@ -114,7 +114,7 @@ def getImageHeat(image_file): return image_heat / 256 def getImageHSL(image_file): - image = Image.open(image_file).convert('RGB').resize((1, 1), Image.ANTIALIAS) + image = Image.open(image_file).convert('RGB').resize((1, 1), Image.LANCZOS) return getHSL(image.getpixel((0, 0))) def getRGB(hsl):