Commit 31d2231e authored by G.M. Amashi S. Bastiansz's avatar G.M. Amashi S. Bastiansz 🎯

Update gifMaker.py with comments

parent 8d1c90f9
"""
This file is used to:
###
# This file is used to:
# generate a GIF image
# send the generated GIF to the folder
# delete the GIF from cache
@author Amashi Bastiansz | IT17143950
@version 1.5
@since 2020-10-01
"""
# @author Amashi Bastiansz | IT17143950
# @version 1.5
# @since 2020-10-01
###
import imageio
import os
......@@ -24,11 +24,11 @@ gifName = ''.join(random.choices(string.ascii_uppercase +
def generateGIF(images):
"""
This method is used to generate a path for the created GIF image
###
# This method is used to generate a path for the created GIF image
@return the generated GIF path
"""
# @return the generated GIF path
###
gifPath = os.path.join(PATH + "\\output\\" + gifName + '.gif')
imageio.mimwrite(gifPath, images, duration=0.5)
......@@ -37,19 +37,20 @@ def generateGIF(images):
def sendGIF():
"""
This method is used to send the generated GIF to the exact folder to store it
"""
###
# This method is used to send the generated GIF to the exact folder to store it
###
x = imageio.mimread(os.path.join(PATH + "\\output\\" + gifName + '.gif'))
return x
def deleteFromCache():
"""
This method is used to delete the generated GIF from cache after uploading it to
the exact project folder
###
# This method is used to delete the generated GIF from cache after uploading it to
# the exact project folder
@return call to generateGIF() method with selected hand images
"""
# @return call to generateGIF() method with selected hand images
###
os.remove(os.path.join(PATH + "\\output\\" + gifName + '.gif'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment