fix poster

This commit is contained in:
j 2014-10-23 12:42:11 +01:00
parent 29eae5b25d
commit 75677ea07e

View file

@ -29,7 +29,7 @@ def render_poster(data, poster):
poster_width = 640 poster_width = 640
poster_height = 1024 poster_height = 1024
poster_ratio = poster_width / poster_height poster_ratio = poster_width / poster_height
poster_color = (255, 255, 0) poster_color = (255, 0, 0)
poster_image = Image.new('RGB', (poster_width, poster_height)) poster_image = Image.new('RGB', (poster_width, poster_height))
font_file = os.path.join(static_root, 'DejaVuSansCondensedBold.ttf') font_file = os.path.join(static_root, 'DejaVuSansCondensedBold.ttf')
font_size = 48 font_size = 48
@ -45,7 +45,7 @@ def render_poster(data, poster):
poster_image.paste(line_image, (0, i * timeline_height)) poster_image.paste(line_image, (0, i * timeline_height))
# id # id
text = 'Bak.ma/' + id text = 'bak.ma/' + id
text_image = Image.new('RGB', (1, 1)) text_image = Image.new('RGB', (1, 1))
text_size = drawText(text_image, (0, 0), text, font_file, font_size, poster_color) text_size = drawText(text_image, (0, 0), text, font_file, font_size, poster_color)
text_width = poster_width text_width = poster_width