forked from jamriska/ebsynth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
print.py
26 lines (22 loc) · 1.61 KB
/
print.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
# ./bin/ebsynth -style result0001.png -guide source0001.png source0004.png -weight 2 -guide map.png map.png -weight 1 -output result0004.png
################ MAKE CHANGES HERE #################
keyframeDir = "keyframes" # path to the input sequence PNGs
inputDir = "source" # path to the input sequence PNGs
outputDir = "outputs" # path to the input sequence PNGs
fileFormat = "%04d" # name of input files, e.g., %03d if files are named 001.png, 002.png
fileExt = "png" # extension of input files (without .), e.g., png, jpg
keyframe = "keyframe" # keyframe for style
FIRST = 1 # number of the first PNG file in the input folder
LAST = 3 # number of the last PNG file in the input folder
####################################################
firstFrame = FIRST
lastFrame = LAST
frameStep = +1
firstOutputFrame=firstFrame+1
inputFiles = inputDir + "/" + fileFormat + "." + fileExt
outputFiles = outputDir + "/" + fileFormat + "." + fileExt
keyframeFile = keyframeDir + "/" + fileFormat + "." + fileExt
print("cp %s %s"%(keyframeFile%(firstFrame),outputFiles%(firstFrame)))
print("./bin/ebsynth -style %s -guide %s %s -weight 2 -guide map.png map.png -weight 1 -output %s"%(keyframeFile%(firstFrame),inputFiles%(firstFrame),inputFiles%(firstFrame+1),outputFiles%(firstFrame+1)))
for frame in range(firstOutputFrame,lastFrame,frameStep):
print("./bin/ebsynth -style %s -guide %s %s -weight 2 -guide map.png map.png -weight 1 -output %s"%(outputFiles%(frame),inputFiles%(frame),inputFiles%(frame+frameStep),outputFiles%(frame+1)))