diff --git a/overlay.py b/overlay.py index d506a4c..9c2959f 100644 --- a/overlay.py +++ b/overlay.py @@ -20,14 +20,14 @@ def overlay(image_in): draw = ImageDraw.Draw(overlay) font = ImageFont.truetype("OptimusPrinceps.ttf", font_size) - draw.rectangle([0, rect_top[1], size[0], rect_bot[1]], fill=(0,0,0)) + draw.rectangle([0, rect_top[1], size[0], rect_bot[1]], fill=(0,0,0, 200)) for y in range(-1, -gradient_range - 1, -1): - c = 255 - 255 * (-y) // gradient_range + c = 200 - 200 * (-y) // gradient_range draw.line([0, rect_top[1] + y, size[0], rect_top[1] + y], fill=(0,0,0,c)) for y in range(1, gradient_range + 1, 1): - c = 255 - 255 * (y) // gradient_range + c = 200 - 200 * (y) // gradient_range draw.line([0, rect_bot[1] + y, size[0], rect_bot[1] + y], fill=(0,0,0,c)) text_size = draw.textsize(message, font=font)