Kovi 的图片智能裁剪插件。支持自定义网格(九宫格、六宫格等),支持通过合并转发发送切片,防止刷屏。
- ✂️ 灵活指令 - 支持
3*3、2x2、4 4等多种分隔符格式 - 🖼️ 智能识别 - 支持处理当前消息中的图片,或引用回复中的图片
- 📦 合并转发 - 自动将裁剪后的碎片打包发送,保持群聊版面整洁
- ⚡ 高性能 - 异步下载,独立线程处理图片,不阻塞 Bot 响应
- 创建 Kovi 项目
- 执行
cargo kovi add image-splitter - 在
src/main.rs中添加kovi_plugin_image_splitter
- 发送一张图片,并附带文字
裁剪 3*3 - 或者,引用一张别人发送的图片,发送
切图 2x2 - 机器人将回复裁剪好的图片集合
插件使用正则匹配,支持多种分隔符(*, x, X, ×, 空格)。
指令 + 行数 + 分隔符 + 列数
| 示例 | 效果 | 说明 |
|---|---|---|
裁剪 3*3 |
3行3列 (9张) | 标准九宫格 |
切图 2x2 |
2行2列 (4张) | 四宫格 |
分割 6 4 |
6行4列 (24张) | 高密度网格 |
裁剪 1x3 |
1行3列 (3张) | 横向长图切分 |
方式一:图文同发
[图片] 裁剪 3*3
方式二:引用图片
[引用某人的图片] 切图 2x2
- 为了防止恶意消耗服务器资源,最大裁剪限制为 10x10。
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.