标签:end read imageio str code pre class 方法 ati
??有时候绘制了一系列迭代图,最直观的展示方法是将其制作为 gif 图,代码为:
import imageio
filenames = []
for i in range(100):
filename = 'Generation '+str(i+1)+'.png'
print(filename)
filenames.append(filename)
img_paths = filenames
gif_images = []
nums=1
for path in img_paths:
gif_images.append(imageio.imread(path))
print(nums)
nums=nums+1
imageio.mimsave("test.gif",gif_images,fps=5)
标签:end read imageio str code pre class 方法 ati
原文地址:https://www.cnblogs.com/yznnnn/p/10629799.html