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)
# print filenames
moviePath ="D:\\simulation.gif"
with imageio.get_writer(moviePath,format='gif', mode='I', duration=0.1, loop=1) as writer:
i=0
for filename in filenames[0:7 ]:
image = imageio.mimread(filename)
writer.append_data(image)
print filename
writer.close()
Hi Nirandika,
No, especially when used properly, as you are doing, the writer should not have any memory limits, as new data is added to the file and not kept in memory.
I do see that you’re sliceing the filenames list, and i never seems to be increased. How have you found the number of images in the resulting GIF?
- Almar
--
You received this message because you are subscribed to the Google Groups "imageio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to imageio+u...@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/imageio.
For more options, visit https://groups.google.com/d/optout.
Could you increase i in the loop and verify that its 3000 when it finishes (i.e. append_data() is called 3000 times)? That should narrow it down a bit.
Thanks,