合并后的部分骰子路径修复

This commit is contained in:
2025-09-30 15:21:53 +08:00
parent 1c01e49d5d
commit 9f6c70bf0f

View File

@ -308,7 +308,7 @@ async def generate_dice_image(number: str) -> BytesIO:
# 如果文本太长,直接返回金箍棒
if(len(text) > 50):
output = BytesIO()
push_image = Image.open(ASSETS_PATH / "stick.png")
push_image = Image.open(ASSETS_PATH / "img" / "dice" / "stick.png")
push_image.save(output,format='PNG')
output.seek(0)
return output
@ -334,7 +334,7 @@ async def generate_dice_image(number: str) -> BytesIO:
move_distance = (up_direction[0] * (stretch_k - 1), up_direction[1] * (stretch_k - 1))
# 加载背景图像,保留透明通道
background = cv2.imread(ASSETS_PATH / "template.png", cv2.IMREAD_UNCHANGED)
background = cv2.imread(ASSETS_PATH / "img" / "dice" / "template.png", cv2.IMREAD_UNCHANGED)
height, width = background.shape[:2]