如何用python制作有线图像

2024-05-17 12:14:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图让图像看起来像botdankmemer一样连接和分发,但我没有找到方法

我的代码我尝试制作有线图像

@bot.command()
async def magik(ctx, user=None):
    if user == None:
        user = ctx.author
    asset = user.avatar_url_as(size=128)
    data = BytesIO(await asset.read())
    pfp = Image.open(data)

    pfp = pfp.resize((500,500))

    pfp.save("profilez.png")
    with imwand(filename ='profilez.png') as image:

     with image.clone() as wave:

        wave.wave(30, 100, 'blend')

        wave.save(filename ='output.png')
        await ctx.send(file=discord.File("output.png"))

Tags: 图像nonedatapngsaveaswithasset