🐛 修复处理问题并优化代码

This commit is contained in:
HibiKier
2024-08-02 20:46:51 +08:00
parent fdb62f7226
commit 36047693aa
5 changed files with 48 additions and 14 deletions
+12
View File
@@ -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,