I need to remove these black borders, that appear after rotating pfp picture:
yesno = Image.open('images\yesno.jpg')
asset = member.avatar_url_as(size = 128)
data = BytesIO(await asset.read())
pfp = Image.open(data)
pfp = pfp.resize((100,100))
pfp = pfp.rotate(-50)
yesno.paste(pfp, (138,408))
yesno.save('proba.jpg')
I'm tried to make transparency masks to remove these black borders, but this is worked only on sad pepe profile picture, on others it wrote 'bad transparency mask'. Also I tried some others way like composite function from pillow but that didn't actually helped me.
This would be awesome if there exists some generic way for my problem to resolve.