From 44149987592b31bbbce94adc8ddf5cf0d6955f94 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 25 Aug 2023 00:18:23 +0200 Subject: [PATCH] Image.ANTIALIAS->Image.LANCZOS --- ox/image.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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):