1
0
Fork 0
mirror of synced 2024-07-01 12:41:40 +12:00
This commit is contained in:
Phxntxm 2016-10-01 22:59:58 -05:00
commit e36223141a

View file

@ -10,7 +10,7 @@ tmp_path = "images/banner/tmp"
whitneyMedium = "/usr/share/fonts/whitney-medium.ttf" whitneyMedium = "/usr/share/fonts/whitney-medium.ttf"
whitneyBold = "/usr/share/fonts/whitney-bold.ttf" whitneyBold = "/usr/share/fonts/whitney-bold.ttf"
header_height = 125 header_height = 125
base_height = 245 canvas_height = 145
banner_background = "{}/bannerTop2.png".format(base_path) banner_background = "{}/bannerTop2.png".format(base_path)
banner_bot = "{}/bannerBot.png".format(base_path) banner_bot = "{}/bannerBot.png".format(base_path)
@ -47,6 +47,7 @@ async def create_banner(member, image_title, data):
result_values = list(data.values()) result_values = list(data.values())
lines_of_text = len(result_keys) lines_of_text = len(result_keys)
output_file = "{}/banner_{}_{}.jpg".format(tmp_path, member.id, int(datetime.datetime.utcnow().timestamp())) output_file = "{}/banner_{}_{}.jpg".format(tmp_path, member.id, int(datetime.datetime.utcnow().timestamp()))
base_height = canvas_height + (lines_of_text * 20)
# This is the background to the avatar # This is the background to the avatar
mask = Image.open('{}/mask.png'.format(base_path)).convert('L') mask = Image.open('{}/mask.png'.format(base_path)).convert('L')