|
|
|
@ -32,15 +32,15 @@ def imagemaker( theme,
|
|
|
|
|
title=reddit_obj['thread_title']
|
|
|
|
|
texts=reddit_obj['thread_post']
|
|
|
|
|
id = re.sub(r"[^\w\s-]", "", reddit_obj["thread_id"])
|
|
|
|
|
|
|
|
|
|
tfont=ImageFont.truetype("fonts\\Roboto-Bold.ttf",27) # for title
|
|
|
|
|
font=ImageFont.truetype("fonts\\Roboto-Regular.ttf", 20)# for despcription|comments
|
|
|
|
|
size=(500,176)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
image =Image.new('RGBA',size,theme)
|
|
|
|
|
draw = ImageDraw.Draw(image)
|
|
|
|
|
|
|
|
|
|
# for titlw
|
|
|
|
|
# for title
|
|
|
|
|
if len(title)>40:
|
|
|
|
|
draw_multiple_line_text(image, title,tfont,txtclr ,padding,wrap=30)
|
|
|
|
|
else:
|
|
|
|
|