This commit is contained in:
shenjack 2024-06-29 01:31:12 +08:00
parent 3b67d58ae2
commit e2e5142688
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -39,7 +39,7 @@ def local_env_image() -> bytes:
img = Image.new("RGB", (800, 120), (255, 255, 255)) img = Image.new("RGB", (800, 120), (255, 255, 255))
# 往图片上写入一些信息 # 往图片上写入一些信息
draw = ImageDraw.Draw(img) draw = ImageDraw.Draw(img)
font = ImageFont.truetype("SMILEYSANS-OBLIQUE.TTF", size=25) font = ImageFont.truetype("./SMILEYSANS-OBLIQUE.TTF", size=25)
draw.text((10, 10), local_env_info(), fill=(0, 0, 0), font=font) draw.text((10, 10), local_env_info(), fill=(0, 0, 0), font=font)
img_cache = io.BytesIO() img_cache = io.BytesIO()
img.save(img_cache, format="PNG") img.save(img_cache, format="PNG")