summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjules <jules@asdf.us>2019-01-16 02:26:37 +0100
committerjules <jules@asdf.us>2019-01-16 02:26:37 +0100
commit285dd6f13633d5fcafd68ca67d228853e7f33dd5 (patch)
treef6b1e300df426459cc17c9a74cc6d3dbaba55e6d
parenta8e994a32e481f667424fc55bffa16f8cd1e2b04 (diff)
fix
-rw-r--r--crop_frames.py7
-rw-r--r--merge_frames.py2
2 files changed, 5 insertions, 4 deletions
diff --git a/crop_frames.py b/crop_frames.py
index dd8c1e6..f45329e 100644
--- a/crop_frames.py
+++ b/crop_frames.py
@@ -25,10 +25,11 @@ def crop_dir():
img = Image.open(files[0])
width, old_height = img.size
- if ratio == (width / height):
- old_height = height
+ if args.ratio == (width / old_height):
+ height = old_height
+ top_offset = 0
else:
- height = round(width / ratio)
+ height = round(width / args.ratio)
top_offset = round((old_height - height) / 2)
print("{}x{} {}".format(width, height, step))
diff --git a/merge_frames.py b/merge_frames.py
index 32e0341..650d51a 100644
--- a/merge_frames.py
+++ b/merge_frames.py
@@ -31,7 +31,7 @@ def make_movie(merge_dir, dataset):
'-crf', '19',
'-vf', 'fps=25',
'-pix_fmt', 'yuv420p',
- os.path.join(opt.render_dir, dataset + '.mp4')
+ os.path.join(args.render_dir, dataset + '.mp4')
])
def merge_files(file, crop_dir_list, ww, hh, overlap, merge_dir):