mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 06:12:53 +08:00
Update image_utils.py
This commit is contained in:
parent
e756a50d97
commit
71026542df
@ -987,7 +987,8 @@ class CreateMat:
|
|||||||
font_size=self.font_size,
|
font_size=self.font_size,
|
||||||
color=(255, 255, 255, 0),
|
color=(255, 255, 255, 0),
|
||||||
)
|
)
|
||||||
while text.size[0] > self.padding_w - 10:
|
idx = 0
|
||||||
|
while text.size[0] > self.padding_w - 10 and idx < 3:
|
||||||
text = CreateImg(
|
text = CreateImg(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@ -996,6 +997,7 @@ class CreateMat:
|
|||||||
color=(255, 255, 255, 0),
|
color=(255, 255, 255, 0),
|
||||||
)
|
)
|
||||||
w, _ = text.getsize(f"{_y}")
|
w, _ = text.getsize(f"{_y}")
|
||||||
|
idx += 1
|
||||||
A.paste(text, (padding_w - w - 10, current_h - h), alpha=True)
|
A.paste(text, (padding_w - w - 10, current_h - h), alpha=True)
|
||||||
current_h -= _interval
|
current_h -= _interval
|
||||||
if x_name:
|
if x_name:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user