I tried to read many examples on the Internet and found that imageio
is the perfect package for it. Also found are examples written here .
I just followed suit as shown and tried the following
import imageio as io import os file_names = sorted((fn for fn in os.listdir('.') if fn.startswith('surface')))
and another example.
images = [] for filename in file_names: images.append(io.imread(filename)) io.mimsave('surface1.gif', images, duration = 0.5)
both of them do not work. And basically, I only see the first frame from the gif and blink and end. The duration is set to 0.5 s, so it should work fine. Maybe I missed something.
source share