I am using the following python code to generate a .gif file from approximately 3000 .png files. But the .gif file has only about 1000 .png files. Why doesn't the .gif file have all the .png files? Is there a limit on the number of .png files that I can combine to create a .gif file?
import imageio import os filenames =[] dirPath = "D:\\BandSim_2017-06-20_12_00_45\\" for file in os.listdir(dirPath): if file.endswith(".png"): filenames.append(dirPath+file) moviePath ="D:\\simulation.gif" with imageio.get_writer(moviePath,mode='I', duration=0.1) as writer: i=0 for filename in filenames: image = imageio.imread(filename) writer.append_data(image) print filename
source share