From 3228f0bb502f7d0609b102b648a3e1fb7554669e Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Mon, 10 Feb 2025 03:06:14 +0900 Subject: [PATCH] =?UTF-8?q?[bugfix]=20Overlay:=20Fix=20the=20error=20'Type?= =?UTF-8?q?Error:=E2=80=99float=E2=80=99=20object=20cannot=20be=20interpre?= =?UTF-8?q?ted=20as=20an=20integer'=20=E6=94=B9=E8=A1=8C=E3=81=8C=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E3=81=AA=E3=81=8F=E3=82=89=E3=81=84=E3=81=AE=E9=95=B7?= =?UTF-8?q?=E3=81=95=E3=81=AE=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=97=E3=82=88=E3=81=86=E3=81=A8=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=81=A8=E3=81=8D=E3=81=AB=E5=87=BA=E3=82=8B=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=80=82=E8=A8=88=E7=AE=97=E6=99=82=E3=80=81?= =?UTF-8?q?int=E5=9E=8B=E3=81=AB=E5=BC=B7=E5=88=B6=E5=A4=89=E6=8F=9B?= =?UTF-8?q?=E3=81=97=E3=81=A6=E4=BF=AE=E6=AD=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-python/models/overlay/overlay_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-python/models/overlay/overlay_image.py b/src-python/models/overlay/overlay_image.py index f9ddf201..52fd242d 100644 --- a/src-python/models/overlay/overlay_image.py +++ b/src-python/models/overlay/overlay_image.py @@ -68,7 +68,7 @@ class OverlayImage: text_width = draw.textlength(text, font) character_width = text_width // len(text) - character_line_num = (base_width // character_width) - 12 + character_line_num = int((base_width // character_width) - 12) if len(text) > character_line_num: text = "\n".join([text[i:i + character_line_num] for i in range(0, len(text), character_line_num)]) text_height = font_size * (len(text.split("\n")) + 1) + 20