Rodrigo_Cobo
commited on
Commit
·
04d57db
1
Parent(s):
49af897
add default images + fix print in split.py
Browse files- WiggleResults/result.jpg +0 -0
- WiggleResults/result_0.gif +0 -0
- WiggleResults/split.py +2 -5
WiggleResults/result.jpg
ADDED
WiggleResults/result_0.gif
ADDED
WiggleResults/split.py
CHANGED
@@ -8,7 +8,6 @@ args = parser.parse_args()
|
|
8 |
|
9 |
path = "."
|
10 |
ROOT_DIR = os.path.dirname(__file__)
|
11 |
-
print(ROOT_DIR)
|
12 |
dirs = os.listdir(ROOT_DIR)
|
13 |
|
14 |
dim = args.dim
|
@@ -55,10 +54,9 @@ def gif_order (data, center=True):
|
|
55 |
#gsdfgsfgf
|
56 |
return gif
|
57 |
|
58 |
-
print("
|
59 |
# This would print all the files and directories
|
60 |
for file in dirs:
|
61 |
-
print(file)
|
62 |
if ".jpg" in file or ".png" in file:
|
63 |
rowImages = []
|
64 |
im = Image.open("./" + ROOT_DIR + '/' + file)
|
@@ -80,7 +78,6 @@ for file in dirs:
|
|
80 |
rowImages = gif_order(rowImages,center=False)
|
81 |
name = "./" + ROOT_DIR + '/' + file[:-4] + "_" + str(i) + '.gif'
|
82 |
rowImages[0].save(name, save_all=True,format='GIF', append_images=rowImages[1:], optimize=True, duration=100, loop=0)
|
83 |
-
print('saved gif '+ name)
|
84 |
pointtop += dim + 4
|
85 |
pointleft = 3
|
86 |
rowImages = []
|
@@ -93,4 +90,4 @@ for file in dirs:
|
|
93 |
|
94 |
# Deleted
|
95 |
#os.remove("data/" + file)
|
96 |
-
print("
|
|
|
8 |
|
9 |
path = "."
|
10 |
ROOT_DIR = os.path.dirname(__file__)
|
|
|
11 |
dirs = os.listdir(ROOT_DIR)
|
12 |
|
13 |
dim = args.dim
|
|
|
54 |
#gsdfgsfgf
|
55 |
return gif
|
56 |
|
57 |
+
print(" [*] Init gif generations!")
|
58 |
# This would print all the files and directories
|
59 |
for file in dirs:
|
|
|
60 |
if ".jpg" in file or ".png" in file:
|
61 |
rowImages = []
|
62 |
im = Image.open("./" + ROOT_DIR + '/' + file)
|
|
|
78 |
rowImages = gif_order(rowImages,center=False)
|
79 |
name = "./" + ROOT_DIR + '/' + file[:-4] + "_" + str(i) + '.gif'
|
80 |
rowImages[0].save(name, save_all=True,format='GIF', append_images=rowImages[1:], optimize=True, duration=100, loop=0)
|
|
|
81 |
pointtop += dim + 4
|
82 |
pointleft = 3
|
83 |
rowImages = []
|
|
|
90 |
|
91 |
# Deleted
|
92 |
#os.remove("data/" + file)
|
93 |
+
print(" [*] End gif generations!")
|