mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-29 00:32:06 +08:00
🐛 修复处理问题并优化代码
This commit is contained in:
@@ -73,6 +73,18 @@ class BuildImage:
|
||||
def size(self) -> Tuple[int, int]:
|
||||
return self.markImg.size
|
||||
|
||||
@classmethod
|
||||
def open(cls, path: str | Path) -> Self:
|
||||
"""打开图片
|
||||
|
||||
参数:
|
||||
path: 图片路径
|
||||
|
||||
返回:
|
||||
Self: BuildImage
|
||||
"""
|
||||
return cls(background=path)
|
||||
|
||||
@classmethod
|
||||
async def build_text_image(
|
||||
cls,
|
||||
|
||||
Reference in New Issue
Block a user