qqwjq1981 commited on
Commit
0489670
·
verified ·
1 Parent(s): 8b6350f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 + 4 * outline_width
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)