Created
June 15, 2019 06:30
-
-
Save MLWhiz/206e31bded02293ede9b2b7d893a50f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generating GIF from PNGs | |
import imageio | |
# create a list of PNGs | |
generated_images = [img_save_dir+str(x).zfill(4)+"_image.png" for x in range(0,num_steps,100)] | |
images = [] | |
for filename in generated_images: | |
images.append(imageio.imread(filename)) | |
imageio.mimsave(img_save_dir+'movie.gif', images) | |
from IPython.display import Image | |
with open(img_save_dir+'movie.gif','rb') as f: | |
display(Image(data=f.read(), format='png')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment