Yaron Koresh commited on
Commit
4c255b6
·
verified ·
1 Parent(s): 4a984ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -806,7 +806,7 @@ def add_song_cover_text(img,top_title=None,bottom_title=None):
806
  labels_distance = 1/3
807
 
808
  if top_title:
809
- rows = len(song.split("\n"))
810
  textheight=min(math.ceil( w / 10 ), math.ceil( h / 5 ))
811
  font = ImageFont.truetype(r"Alef-Bold.ttf", textheight)
812
  textwidth = draw.textlength(top_title,font)
@@ -816,7 +816,7 @@ def add_song_cover_text(img,top_title=None,bottom_title=None):
816
  draw.text((x, y), top_title, (255,255,255), font=font, spacing=2, stroke_width=math.ceil(textheight/20), stroke_fill=(0,0,0))
817
 
818
  if bottom_title:
819
- rows = len(artist.split("\n"))
820
  textheight=min(math.ceil( w / 10 ), math.ceil( h / 5 ))
821
  font = ImageFont.truetype(r"Alef-Bold.ttf", textheight)
822
  textwidth = draw.textlength(bottom_title,font)
 
806
  labels_distance = 1/3
807
 
808
  if top_title:
809
+ rows = len(top_title.split("\n"))
810
  textheight=min(math.ceil( w / 10 ), math.ceil( h / 5 ))
811
  font = ImageFont.truetype(r"Alef-Bold.ttf", textheight)
812
  textwidth = draw.textlength(top_title,font)
 
816
  draw.text((x, y), top_title, (255,255,255), font=font, spacing=2, stroke_width=math.ceil(textheight/20), stroke_fill=(0,0,0))
817
 
818
  if bottom_title:
819
+ rows = len(bottom_title.split("\n"))
820
  textheight=min(math.ceil( w / 10 ), math.ceil( h / 5 ))
821
  font = ImageFont.truetype(r"Alef-Bold.ttf", textheight)
822
  textwidth = draw.textlength(bottom_title,font)