Closed LambdaYH closed 1 year ago
逝世新版
白色背景下没黑边了,但是非白色背景下出现了白色不透明四角(
@test.handle()
async def _():
text_img = BuildImage.new(
mode="RGBA", size=(80, 80), color=(230, 230, 230)).circle_corner(r=20)
# text_img = BuildImage.new(mode="RGBA", size=(80, 80), color=(230,230,230)).circle()
bg_img = BuildImage.new(mode="RGBA", size=(200, 200), color=(128, 128, 128))
bg_img.paste(text_img, pos=(20, 20), alpha=True)
await test.send(MessageSegment.image(bg_img.save_png()))
https://github.com/noneplugin/nonebot-plugin-imageutils/blob/3b758df50b9b3ba0f8ac4773dbdcbe833a3ebebe/nonebot_plugin_imageutils/build_image.py#L155 https://github.com/noneplugin/nonebot-plugin-imageutils/blob/3b758df50b9b3ba0f8ac4773dbdcbe833a3ebebe/nonebot_plugin_imageutils/build_image.py#L165 这里改成
bg = Image.new("RGBA", image.size, (255, 255, 255, 0))
似乎就正常了
雀食
已经改了
如图
测试代码如下: