Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 08-31-2022.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,5 @@ The inspiration to visualize vaccine rate v death rate for this project came fro
[Philip Bogden](https://github.com/pbogden) | [Sophia Cofone](https://github.com/sophiacofone) | [Qiwei "Jerry" Hu](https://github.com/JerryV77) |
[Connor Lynch](https://github.com/CCLynch) | [Philip Mathieu](https://github.com/PhilipMathieu) | [Bridget Mohler](https://github.com/b-mohler) |
[Matthew Ray](https://github.com/MatthewjRay) | [Kayne Ryan](https://github.com/kayneryan) | [Zheng Yune](https://github.com/zyune) |

# Made changes in readme file - meghDev
Binary file added img/08-31-2022.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions src/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import imageio as iio
import os
import glob
import time

def create_gif(filename_save):
"""This function creates a gif animation from a folder of png images
Expand All @@ -14,11 +16,21 @@ def create_gif(filename_save):
"""
#makes a list of im NumPy arrays based on a list of .png images (read from folder)
images = list()

#changes made by meghDev
dir_name = 'img/'
list_of_files = filter( os.path.isfile,
glob.glob(dir_name + '*') )

list_of_files = sorted( list_of_files,
key = os.path.getmtime)


#this part looks at the img directory and reads in all the files that end with .png (only going to bring in those)
for filename in sorted(os.listdir('img')):
for filename in list_of_files: #changes made by meghDev
#sorted(os.listdir('img')):
if filename[-4:] == '.png' and not filename == 'comparison.png':
f = os.path.join('img',filename)
f = os.path.join(filename)
im = iio.imread(f)
images.append(im)

Expand Down