# A function to make a movie slideshow for a folder of images
# note that the moviename should contain.mov

def makeSlideShow(path, moviename):
  
  #create a file list of all the pictures in the path
  files = getPicFileNames(path)
  
  #create a list of images from the path
  imageList = []
  for i in files:
    imageList.append(makePicture(path+"//"+i))
  
  #make a movie from the list of images
  makeMovieFromPictures(imageList, path+"//"+moviename, 1)

def getPicFileNames(path):
  
  #import needed os library
  import os
  #create list to place filenames in
  fileList = []

  #place all jpegs in the given path into the filelist
  for filename in os.listdir(path):
    filetype = filename[len(filename)-4:len(filename)]
    if filetype.lower() == '.jpg': 
      fileList.append(filename)
  
  #return the list of all jpeg files in the given path
  return fileList