diff options
author | Maxim Devaev <[email protected]> | 2023-07-05 12:31:43 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2023-07-05 12:31:43 +0300 |
commit | e0c32c2111ad32f8c812c86511f85c8d2f0e878c (patch) | |
tree | 5da7a169893827c4e9fa31efc1efb77b743b2735 /kvmd/apps | |
parent | 4e9d93b2b1c92542db957eec71161f94f9ccb643 (diff) |
Fix for Pillow 10.x
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/kvmd/ocr.py | 2 | ||||
-rw-r--r-- | kvmd/apps/kvmd/streamer.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/apps/kvmd/ocr.py b/kvmd/apps/kvmd/ocr.py index fbe02b49..ba96093c 100644 --- a/kvmd/apps/kvmd/ocr.py +++ b/kvmd/apps/kvmd/ocr.py @@ -148,7 +148,7 @@ class Ocr: image = image_cropped ImageOps.grayscale(image) - image_resized = image.resize((int(image.size[0] * 2), int(image.size[1] * 2)), PilImage.BICUBIC) + image_resized = image.resize((int(image.size[0] * 2), int(image.size[1] * 2)), PilImage.Resampling.BICUBIC) image.close() image = image_resized diff --git a/kvmd/apps/kvmd/streamer.py b/kvmd/apps/kvmd/streamer.py index 933498fd..bf4ad8d1 100644 --- a/kvmd/apps/kvmd/streamer.py +++ b/kvmd/apps/kvmd/streamer.py @@ -72,7 +72,7 @@ class StreamerSnapshot: with io.BytesIO(self.data) as snapshot_bio: with io.BytesIO() as preview_bio: with PilImage.open(snapshot_bio) as image: - image.thumbnail((max_width, max_height), PilImage.ANTIALIAS) + image.thumbnail((max_width, max_height), PilImage.Resampling.LANCZOS) image.save(preview_bio, format="jpeg", quality=quality) return preview_bio.getvalue() |