fix🐛: 修改图片bytes发送

This commit is contained in:
HibiKier
2024-02-28 00:38:54 +08:00
parent 9f17a525f1
commit aa68553539
12 changed files with 64 additions and 51 deletions
+6 -4
View File
@@ -463,13 +463,15 @@ class BuildImage:
base64_str = base64.b64encode(buf.getvalue()).decode()
return "base64://" + base64_str
def pic2io(self) -> BytesIO:
"""图片转 BytesIO
def pic2bytes(self) -> bytes:
"""获取bytes
返回:
BytesIO: BytesIO
bytes: bytes
"""
return BytesIO(self.tobytes())
buf = BytesIO()
self.markImg.save(buf, format="PNG")
return buf.getvalue()
def convert(self, type_: ModeType) -> Self:
"""