From 170ec73de28e19546474661ddf77ca2577497a24 Mon Sep 17 00:00:00 2001 From: mattaster Date: Wed, 8 Nov 2023 12:32:31 -0500 Subject: [PATCH] Replaced Image.ANTIALIAS with Image.Resampling.LANCZOS (#920) Image.ANTIALIAS is deprecated, this was causing an issue in generating the snapshot previews. --- octoprint_octolapse/snapshot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octoprint_octolapse/snapshot.py b/octoprint_octolapse/snapshot.py index 30fc37ad..7323d175 100644 --- a/octoprint_octolapse/snapshot.py +++ b/octoprint_octolapse/snapshot.py @@ -482,7 +482,7 @@ def create_thumbnail(self): with Image.open(latest_snapshot_path) as img: wpercent = (basewidth / float(img.size[0])) hsize = int((float(img.size[1]) * float(wpercent))) - img.thumbnail([basewidth, hsize], Image.ANTIALIAS) + img.thumbnail([basewidth, hsize], Image.Resampling.LANCZOS) img.save( utility.get_latest_snapshot_thumbnail_download_path( self.snapshot_job_info.temporary_directory, self.snapshot_job_info.camera.guid