-
Notifications
You must be signed in to change notification settings - Fork 0
/
launch_command_config.py
63 lines (48 loc) · 2.53 KB
/
launch_command_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import argparse
def GetArguments():
defaultSettings = {
"inputImagePath": "img/inputTexture.gif",
"tileImagePath": "img/mosaicTexture.gif",
"outputImagePath": "output.gif",
"animationOffsetImagePath": None,
"tileResolution": 25,
"inputImageFramerate": None,
"tileImageFramerate": None,
"maxFramerateStretch": 0.1,
"maxRepetitions": 10,
"tileAnimationOffsetStrength": 1,
}
parser = argparse.ArgumentParser(
description="Amogus Twerk Mosaic Gif Generator")
parser.add_argument("-i", "--inputImagePath",
help="Input Image (Gif) for the animation",
default=defaultSettings["inputImagePath"])
parser.add_argument("-t", "--tileImagePath",
help="Image (Gif) for the tiles",
default=defaultSettings["tileImagePath"])
parser.add_argument("-o", "--outputImagePath",
help="Output image",
default=defaultSettings["outputImagePath"])
parser.add_argument("-ao", "--animationOffsetImagePath",
help="Offset image for tiles",
default=defaultSettings["animationOffsetImagePath"])
parser.add_argument("-r", "--tileResolution",
help="Amount of mosaic tiles in width", type=int,
default=defaultSettings["tileResolution"])
parser.add_argument("-if", "--inputImageFramerate",
help="Framerate of the input Image (don't set for automatic dectection)", type=int,
default=defaultSettings["inputImageFramerate"])
parser.add_argument("-tf", "--tileImageFramerate",
help="Framerate of the tile Image (don't set for automatic dectection)", type=int,
default=defaultSettings["tileImageFramerate"])
parser.add_argument("-s", "--maxFramerateStretch",
help="Maximum framerate stretch (in %%)", type=int,
default=defaultSettings["maxFramerateStretch"])
parser.add_argument("-re", "--maxRepetitions",
help="Maximum loops", type=int,
default=defaultSettings["maxRepetitions"])
parser.add_argument("-os", "--tileAnimationOffsetStrength",
help="Strength of the animation offset", type=int,
default=defaultSettings["tileAnimationOffsetStrength"])
args = parser.parse_args()
return args