diff --git a/cache.py b/cache.py index be44178..f33cbb1 100644 --- a/cache.py +++ b/cache.py @@ -84,7 +84,7 @@ class ImageCache: return datetime.now(timezone.utc) + self.LIFETIME def _hash(self, image: Image) -> ImageHash: - pixel_data = list(image.resize((10, 10), Image_module.ANTIALIAS).convert('L').getdata()) + pixel_data = list(image.resize((10, 10), Image_module.LANCZOS).convert('L').getdata()) avg_pixel = sum(pixel_data) / len(pixel_data) bits = ''.join('1' if px >= avg_pixel else '0' for px in pixel_data) return ImageHash(f"{int(bits, 2):x}.png") diff --git a/requirements.txt b/requirements.txt index 390b686..0327d61 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ aiohttp>2.0,<4.0 -Pillow<10.0 +Pillow pystray PyGObject; sys_platform == "linux" # required for better system tray support on Linux # selenium-wire