diff --git a/08-31-2022.png b/08-31-2022.png new file mode 100644 index 0000000..af9adee Binary files /dev/null and b/08-31-2022.png differ diff --git a/README.md b/README.md index 392499e..8408138 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/img/08-31-2022.png b/img/08-31-2022.png new file mode 100644 index 0000000..af9adee Binary files /dev/null and b/img/08-31-2022.png differ diff --git a/src/animation.py b/src/animation.py index ed200b9..4f7e801 100644 --- a/src/animation.py +++ b/src/animation.py @@ -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 @@ -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)