Skip to content

Commit

Permalink
Replaced Image.ANTIALIAS with Image.Resampling.LANCZOS (#920)
Browse files Browse the repository at this point in the history
Image.ANTIALIAS is deprecated, this was causing an issue in generating the snapshot previews.
  • Loading branch information
mattaster committed Nov 8, 2023
1 parent a39e21b commit 170ec73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion octoprint_octolapse/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 170ec73

Please sign in to comment.