diff --git a/hcatitles.py b/hcatitles.py index a4461c9..71386ae 100644 --- a/hcatitles.py +++ b/hcatitles.py @@ -10,7 +10,6 @@ def update_image(original, title, subtitle): renders text on full sized slide make half sized copy for preview and fill top/bottom with white. """ - background = original image = Image.new(mode="RGBA", size=(1280,720)) font1 = ImageFont.truetype('tahomabd.ttf', 50) font2 = ImageFont.truetype('tahomabd.ttf', 38) @@ -19,7 +18,7 @@ def update_image(original, title, subtitle): stroke_width=4, stroke_fill='black', spacing=4) draw.text((20,588), subtitle, font=font2, fill='white', stroke_width=4, stroke_fill='black', spacing=4) - background.paste(image, (0,0), image) + background = Image.alpha_composite(original, image) return background def update_thumbnail(image):