Created
November 12, 2015 22:41
-
-
Save error454/7fc4718c4712d03b3ea8 to your computer and use it in GitHub Desktop.
Convert all subfolders to animated gif
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import os | |
import glob | |
convertpath = 'C:\Program Files\ImageMagick-6.9.2-Q16\convert.exe' | |
def MakeGif(folder): | |
gifcommand = [convertpath, '-delay', '10', folder +'/*.jpg', folder + '.gif'] | |
print gifcommand | |
subprocess.call(gifcommand) | |
folders = next(os.walk('.'))[1] | |
for folder in folders: | |
MakeGif(folder) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment