From f6c7e8a80b65991157a12f618266d5005528c26b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 29 Nov 2018 21:10:28 +0100 Subject: paths --- crop-equirectangular.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crop-equirectangular.py') diff --git a/crop-equirectangular.py b/crop-equirectangular.py index 7e494be..ae2cee0 100644 --- a/crop-equirectangular.py +++ b/crop-equirectangular.py @@ -27,9 +27,9 @@ overlapped_aspect = overall_aspect - count * opt.overlap crop_width = src_width * output_aspect / overlapped_aspect crop_height = crop_width / output_aspect -c0 = 7/6 * crop_width -c1 = 3/6 * crop_width -c2 = 5/6 * crop_width +c0 = 7/6 * src_width +c1 = 3/6 * src_width +c2 = 5/6 * src_width x0 = c0 - crop_width / 2 x1 = c1 - crop_width / 2 @@ -59,7 +59,7 @@ os.makedirs(path_2) for i, fn in enumerate(glob.glob(os.path.join(opt.folder, '*.png'))): if (i % 100) == 0: print("{}...".format(i)) - out_fn = "frame_{:04d}.png".format(i) + out_fn = "frame_{:05d}.png".format(i + 1) canvas = Image.new('RGB', (src_width, int(src_height * 3/2),)) image = Image.open(fn) -- cgit v1.2.3-70-g09d2