Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -390,7 +390,7 @@ def create_subtitle_clip_pil(text, start_time, end_time, video_width, video_heig
|
|
| 390 |
|
| 391 |
outline_width=2
|
| 392 |
line_heights = [draw.textbbox((0, 0), l, font=font)[3] - draw.textbbox((0, 0), l, font=font)[1] for l in lines]
|
| 393 |
-
total_height = sum(line_heights) + (len(lines) - 1) * 5 +
|
| 394 |
|
| 395 |
img = Image.new("RGBA", (subtitle_width, total_height), (0, 0, 0, 0))
|
| 396 |
draw = ImageDraw.Draw(img)
|
|
|
|
| 390 |
|
| 391 |
outline_width=2
|
| 392 |
line_heights = [draw.textbbox((0, 0), l, font=font)[3] - draw.textbbox((0, 0), l, font=font)[1] for l in lines]
|
| 393 |
+
total_height = sum(line_heights) + (len(lines) - 1) * 5 + 6 * outline_width
|
| 394 |
|
| 395 |
img = Image.new("RGBA", (subtitle_width, total_height), (0, 0, 0, 0))
|
| 396 |
draw = ImageDraw.Draw(img)
|