From c118baade859efa86433378cb572173733d6aef8 Mon Sep 17 00:00:00 2001 From: student_2333 Date: Wed, 30 Oct 2024 00:35:09 +0800 Subject: [PATCH] up --- nonebot_plugin_nailongremove/__init__.py | 2 +- nonebot_plugin_nailongremove/handler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nonebot_plugin_nailongremove/__init__.py b/nonebot_plugin_nailongremove/__init__.py index a3f4c14..db538d2 100644 --- a/nonebot_plugin_nailongremove/__init__.py +++ b/nonebot_plugin_nailongremove/__init__.py @@ -9,7 +9,7 @@ require("nonebot_plugin_uninfo") from . import handler as handler from .config import Config -__version__ = "2.1.1.post1" +__version__ = "2.1.1.post2" __plugin_meta__ = PluginMetadata( name="自动撤回奶龙", description="一个基于图像分类模型的简单插件~", diff --git a/nonebot_plugin_nailongremove/handler.py b/nonebot_plugin_nailongremove/handler.py index cbb874c..98c996f 100644 --- a/nonebot_plugin_nailongremove/handler.py +++ b/nonebot_plugin_nailongremove/handler.py @@ -203,7 +203,7 @@ async def handle_function( } if checked_image is not None: bio = io.BytesIO() - img = PilImage.fromarray(checked_image) + img = PilImage.fromarray(cv2.cvtColor(checked_image, cv2.COLOR_BGR2RGB)) img.save(bio, "PNG") mapping["$checked_image"] = bio.getvalue() await UniMessage.template(template_str).format_map(mapping).finish()