mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 21:11:16 +00:00
Change ANTIALIAS to Resampling.LANCZOS
This commit is contained in:
parent
4549edb569
commit
86c810ee37
1 changed files with 2 additions and 2 deletions
|
@ -172,7 +172,7 @@ def generate_instance_layer(content_width):
|
||||||
instance_text_x = 0
|
instance_text_x = 0
|
||||||
|
|
||||||
if logo_img:
|
if logo_img:
|
||||||
logo_img.thumbnail((50, 50), Image.ANTIALIAS)
|
logo_img.thumbnail((50, 50), Image.Resampling.LANCZOS)
|
||||||
|
|
||||||
instance_layer.paste(logo_img, (0, 0))
|
instance_layer.paste(logo_img, (0, 0))
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ def generate_preview_image(
|
||||||
# Cover
|
# Cover
|
||||||
try:
|
try:
|
||||||
inner_img_layer = Image.open(picture)
|
inner_img_layer = Image.open(picture)
|
||||||
inner_img_layer.thumbnail((inner_img_width, inner_img_height), Image.ANTIALIAS)
|
inner_img_layer.thumbnail((inner_img_width, inner_img_height), Image.Resampling.LANCZOS)
|
||||||
color_thief = ColorThief(picture)
|
color_thief = ColorThief(picture)
|
||||||
dominant_color = color_thief.get_color(quality=1)
|
dominant_color = color_thief.get_color(quality=1)
|
||||||
except: # pylint: disable=bare-except
|
except: # pylint: disable=bare-except
|
||||||
|
|
Loading…
Reference in a new issue