making gif from images using imageio in python
This works for me:
import osimport imageiopng_dir = '../animation/png'images = []for file_name in sorted(os.listdir(png_dir)): if file_name.endswith('.png'): file_path = os.path.join(png_dir, file_name) images.append(imageio.imread(file_path))imageio.mimsave('../animation/gif/movie.gif', images)
in case anyone needs it,for python 3.6.8, it needed fps
imageio.mimsave('/path/file.gif',images,fps=55)