Skip to content

Commit

Permalink
fixed antialias with pillow 10, #416
Browse files Browse the repository at this point in the history
  • Loading branch information
sehmaschine committed Jul 27, 2023
1 parent e71257e commit 0256638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filebrowser/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def scale_and_crop(im, width=None, height=None, opts='', **kwargs):
r = min(xr / x, yr / y)

if r < 1.0 or (r > 1.0 and 'upscale' in opts):
im = im.resize((int(math.ceil(x * r)), int(math.ceil(y * r))), resample=Image.ANTIALIAS)
im = im.resize((int(math.ceil(x * r)), int(math.ceil(y * r))), resample=Image.Resampling.LANCZOS)

if 'crop' in opts:
x, y = [float(v) for v in im.size]
Expand Down

0 comments on commit 0256638

Please sign in to comment.