Skip to content

Commit

Permalink
F
Browse files Browse the repository at this point in the history
Signed-off-by: ˹ᴧɴσɴʏᴍσᴜs ꭙ˼ <TheAnonymousX1025@gmail.com>
  • Loading branch information
AnonymousX1025 authored Jul 3, 2023
1 parent 94b992d commit 05aad28
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AnonX/utils/thumbnails.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async def gen_thumb(videoid, user_id):
x2 = Xcenter + 250
y2 = Ycenter + 250
logo = youtube.crop((x1, y1, x2, y2))
logo.thumbnail((520, 520), Image.ANTIALIAS)
logo.thumbnail((520, 520), Image.LANCZOS)
logo.save(f"cache/chop{videoid}.png")
if not os.path.isfile(f"cache/cropped{videoid}.png"):
im = Image.open(f"cache/chop{videoid}.png").convert("RGBA")
Expand All @@ -109,7 +109,7 @@ async def gen_thumb(videoid, user_id):

crop_img = Image.open(f"cache/cropped{videoid}.png")
logo = crop_img.convert("RGBA")
logo.thumbnail((365, 365), Image.ANTIALIAS)
logo.thumbnail((365, 365), Image.LANCZOS)
width = int((1280 - 365) / 2)
background = Image.open(f"cache/temp{videoid}.png")
background.paste(logo, (width + 2, 138), mask=logo)
Expand Down Expand Up @@ -240,7 +240,7 @@ async def gen_qthumb(videoid, user_id):
x2 = Xcenter + 250
y2 = Ycenter + 250
logo = youtube.crop((x1, y1, x2, y2))
logo.thumbnail((520, 520), Image.ANTIALIAS)
logo.thumbnail((520, 520), Image.LANCZOS)
logo.save(f"cache/chop{videoid}.png")
if not os.path.isfile(f"cache/cropped{videoid}.png"):
im = Image.open(f"cache/chop{videoid}.png").convert("RGBA")
Expand All @@ -249,7 +249,7 @@ async def gen_qthumb(videoid, user_id):

crop_img = Image.open(f"cache/cropped{videoid}.png")
logo = crop_img.convert("RGBA")
logo.thumbnail((365, 365), Image.ANTIALIAS)
logo.thumbnail((365, 365), Image.LANCZOS)
width = int((1280 - 365) / 2)
background = Image.open(f"cache/temp{videoid}.png")
background.paste(logo, (width + 2, 138), mask=logo)
Expand Down

0 comments on commit 05aad28

Please sign in to comment.