I have a folder with circular masked png images:
Usually I use this code to make gifs:
import imageio
import os
imglist = []
images = []
path = ('\\').join(__file__.split('\\')[:-1]) + '\\' + 'images\\'
for r, _, f in os.walk(path):
for i in f:
imglist.append(r + i)
for filename in imglist:
if filename.endswith('.png'):
images.append(imageio.imread(filename))
frames_per_second = 24
gifpath = ('\\').join(__file__.split('\\')[:-1]) + '\\' + 'GIF.gif'
imageio.mimsave(gifpath, images, duration = 1/frames_per_second)
This works fine for ordinary images but it seems to ignore masked images. The gif looks like this:
Any idea how to make a circular gif?