gojiteji commited on
Commit
be438a1
·
verified ·
1 Parent(s): a06749c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -175,9 +175,10 @@ def generate(logo=None, Vtubername=""):
175
 
176
  if caption.width > target_caption_width:
177
  aspect_ratio = caption.height / caption.width
178
- new_height = int(target_caption_width * aspect_ratio)
 
179
 
180
- resized_caption = caption.resize((target_caption_width, new_height), Image.ANTIALIAS)
181
  return resized_caption
182
  else:
183
  return caption
 
175
 
176
  if caption.width > target_caption_width:
177
  aspect_ratio = caption.height / caption.width
178
+ new_width = int(target_caption_width * aspect_ratio)
179
+ new_height = int(target_caption_height * aspect_ratio)
180
 
181
+ resized_caption = caption.resize((new_width, new_height), Image.ANTIALIAS)
182
  return resized_caption
183
  else:
184
  return caption