I am trying to create a gif using python either through the GraphicsMagick module or using os.system commands with the ImageMagick.exe. The most relevant question I have found here was this question about 6 years ago.
URL for imagemagick download
file:///C:/Program%20Files/ImageMagick-6.9.1-Q16/www/binary-releases.html#windows
Below is my code (not working). I am currently trying the ImageMagick route as the above question stated that this was more pythonic. Any help would be appreciated.
from pgmagick import Image, ImageList, Geometry, Color
import os, sys
import glob
#dataDir = sys.argv[1]
#outDir = sys.argv[2]
dataDir = 'C:\\Users\\name\\Desktop\\a'
os.chdir(dataDir)
fileList = glob.glob(dataDir + '\*.jpg')
fileList.sort()
os.system('convert fileList -delay 20 -loop 0 *jpg animated.gif')
I get an invalid syntax error on the last line of my code.