I'm trying to make a fortnite image card generator. I want it to make the skin on the top layer and the bg aka the gif on the bottom. Here is the code so far.
import os
from PIL import Image
filename = 'CID_613_Athena_Commando_M_Columbus_7Y4QE.png'
skin = Image.open(filename, 'r')
filename1 = 'bg.gif'
bg = Image.open(filename1, 'r')
text_img = Image.new('RGBA', (512,512), (0, 0, 0, 0))
text_img.paste(bg, (0,0))
text_img.paste(skin, (0,0), mask=skin)
text_img.save("out.gif", format="gif")
The CID_613_Athena_Commando_M_Columbus_7Y4QE.png is: https://imgur.com/Seu1Tx6.png
Background: https://i.imgur.com/fCewt2H.gif
And here is the output: https://i.imgur.com/4yJMp3M.png
I want it to be like animated background. Unlike what it is right now
