Sync v2.0 version of code to github repo

This commit is contained in:
Jiang-Jia-Jun
2025-06-29 23:29:37 +00:00
parent d151496038
commit 92c2cfa2e7
597 changed files with 78776 additions and 22905 deletions

View File

@@ -78,13 +78,13 @@ class ImageMediaIO(MediaIO[Image.Image]):
"""
return self.load_bytes(base64.b64decode(data))
def load_file(self, filepath: Path) -> Image.Image:
def load_file(self, filepath: str) -> Image.Image:
"""
加载文件,并转换为指定模式。
如果文件不存在或无法打开将抛出FileNotFoundError异常。
Args:
filepath (Path): 文件路径Pathlib.Path对象
filepath (str): 文件路径。
Returns:
Image.Image: 返回一个Image.Image对象表示已经加载和转换的图像。