From 285dd6f13633d5fcafd68ca67d228853e7f33dd5 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 16 Jan 2019 02:26:37 +0100 Subject: fix --- crop_frames.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crop_frames.py') 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)) -- cgit v1.2.3-70-g09d2