From e764cfcc1c9dacfa6424423845a448a373e8307e Mon Sep 17 00:00:00 2001 From: mmmjie <45615222+mmmjie@users.noreply.github.com> Date: Fri, 10 Jun 2022 00:35:57 +0800 Subject: [PATCH 1/2] Update white2black_image.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 随着7b836ac 对utils/image_utils.py 的改动 调整此插件对于 utils/image_utils.py改动的引用部分 --- plugins/white2black_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/white2black_image.py b/plugins/white2black_image.py index e9643f4c..730740c7 100755 --- a/plugins/white2black_image.py +++ b/plugins/white2black_image.py @@ -61,7 +61,7 @@ async def _(event: MessageEvent, arg: Message = CommandArg()): msg_sp = msg.split("<|>") w, h = w2b.size add_h, font_size = init_h_font_size(h) - bg = BuildImage(w, h + add_h, color="black", font_size=font_size) + bg = BuildImage(w, h + add_h, color="black", font_size=int(font_size)) bg.paste(w2b) chinese_msg = formalization_msg(msg) if not bg.check_font_size(chinese_msg): From 7d5a82ab6d2b4ab1fcfece458079e62ef694d1c3 Mon Sep 17 00:00:00 2001 From: mmmjie <45615222+mmmjie@users.noreply.github.com> Date: Fri, 10 Jun 2022 00:37:18 +0800 Subject: [PATCH 2/2] Update update_picture.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 对于temp/temp的错误路径,减少了一个temp TEMP_PATH 已经指向了一个temp了 --- plugins/update_picture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/update_picture.py b/plugins/update_picture.py index 8433b7e2..f758e546 100755 --- a/plugins/update_picture.py +++ b/plugins/update_picture.py @@ -232,7 +232,7 @@ async def _( result += image(b64=pic2b64(img)) if method in ["模糊效果", "6"]: for i in range(index): - img = Image.open(TEMP_PATH / f"temp/{event.user_id}_{i}_update.png").filter( + img = Image.open(TEMP_PATH / f"{event.user_id}_{i}_update.png").filter( ImageFilter.BLUR ) result += image(b64=pic2b64(img))