Update Pillow to v10.0
This commit is contained in:
1 parent
dcd740d18d
commit
67cfc6603d
2 files changed
+2
-2
No files matched your search
@@ -84,7 +84,7 @@ class ImageCache:
|
|||||||
return datetime.now(timezone.utc) + self.LIFETIME
|
return datetime.now(timezone.utc) + self.LIFETIME
|
||||||
|
|
||||||
def _hash(self, image: Image) -> ImageHash:
|
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)
|
avg_pixel = sum(pixel_data) / len(pixel_data)
|
||||||
bits = ''.join('1' if px >= avg_pixel else '0' for px in pixel_data)
|
bits = ''.join('1' if px >= avg_pixel else '0' for px in pixel_data)
|
||||||
return ImageHash(f"{int(bits, 2):x}.png")
|
return ImageHash(f"{int(bits, 2):x}.png")
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
aiohttp>2.0,<4.0
|
aiohttp>2.0,<4.0
|
||||||
Pillow<10.0
|
Pillow
|
||||||
pystray
|
pystray
|
||||||
PyGObject; sys_platform == "linux" # required for better system tray support on Linux
|
PyGObject; sys_platform == "linux" # required for better system tray support on Linux
|
||||||
# selenium-wire
|
# selenium-wire
|
||||||
|
|||||||
Reference in new issue
Block a user