def draw(img):
SAVEANIMATION = False # Make this True to create an animated file. Warning: large.
imgs=alife(img,randint(20,80))
filename = "imagesTest/ablife_"+str(randint(1000000,9999999))+".gif"
imgsNumpy = []
for image in imgs:
imgsNumpy.append(array(image.getdata()).reshape(image.size[0], image.size[1], 4))
if SAVEANIMATION == True:
imageio.mimsave(filename, imgsNumpy)
imageBlend(img,imgs[len(imgs)-1])
评论列表
文章目录