修复bug

This commit is contained in:
KimigaiiWuyi 2021-08-05 23:01:45 +08:00
parent 5db5379370
commit 6d1743efc9
2 changed files with 27 additions and 7 deletions

View File

@ -1,7 +1,9 @@
# GenshinUID
# GenshinUID / 原神UID查询
一个HoshinoBot插件用于查询原神UID信息。
注意:本插件不包含本体,您应该配合[Mrs4s](https://github.com/Mrs4s) / [go-cqhttp](https://github.com/Mrs4s/go-cqhttp) 和 [HoshinoBot](https://github.com/Ice-Cirno/HoshinoBot) 使用本插件的作用是利用米游社API查询指定原神UID信息Cookies获取可前往[YuanShen_User_Info](https://github.com/Womsxd/YuanShen_User_Info)查看教程)
已完成:角色排序(星级>等级>好感),背景图自定义(通过传参形式)
未完成:深渊数据导出,角色详细信息列表(包括武器信息,和全角色)
@ -36,15 +38,31 @@ $ pip3 install -r requirements.txt
## 更新记录
2021-8-01 添加自定义背景图
#### 2021-8-05
2021-7-29 优化排序算法
修复自定义图片时,竖屏图片可能造成黑边问题
2021-7-28 添加排序算法
降低高斯模糊值
2021-7-26 完成主体
#### 2021-8-01
2021-7-18 本项目开坑
添加自定义背景图
#### 2021-7-29
优化排序算法
#### 2021-7-28
添加排序算法
#### 2021-7-26
完成主体
#### 2021-7-18
本项目开坑
## 指令

View File

@ -55,6 +55,8 @@ async def draw_pic(uid,nickname,image = None):
new_h = math.ceil(800/float(scale))
if w > h:
bg_img2 = edit_bg.resize((new_w, 1200),Image.ANTIALIAS)
elif float(scale) > 0.66:
bg_img2 = edit_bg.resize((new_w, 1200),Image.ANTIALIAS)
else:
bg_img2 = edit_bg.resize((800, new_h),Image.ANTIALIAS)
bg_img = bg_img2.crop((0, 0, 800, 1200))
@ -69,7 +71,7 @@ async def draw_pic(uid,nickname,image = None):
#img = Image.open(bg_path)
area = (37, 268, 764, 1154)
img_bb = bg_img.crop(area)
img_blur = img_bb.filter(ImageFilter.GaussianBlur(5))
img_blur = img_bb.filter(ImageFilter.GaussianBlur(4))
bg_img.paste(img_blur, (37,268),mask_img)