stranck-dev in drew-dev #17

Merged
drew merged 8 commits from stranck-dev into drew-dev 2024-02-13 15:47:38 +00:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 951e4c0015 - Show all commits

View File

@ -18,7 +18,8 @@ def draw_profile (source, member, position, font, size=(170, 170), border_width=
# Draw border
idraw.rounded_rectangle(border_loc, border_width, border_color)
# Draw profile picture
with Image.open(f'res/propic/{member['propic'] or 'default.png'}') as to_add:
fileName = member['propic'] or 'default.png'
with Image.open(f'res/propic/{fileName}') as to_add:
source.paste(to_add.resize (size), profile_location)
name_len = idraw.textlength(str(member['name']), font)
calc_size = 0