diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-11-29 21:10:28 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-11-29 21:10:28 +0100 |
| commit | f6c7e8a80b65991157a12f618266d5005528c26b (patch) | |
| tree | 888501c694415842d059917fcd8b4527de16ccbb | |
| parent | 1a068bfc4314c8900feb04712992012576ccac4b (diff) | |
paths
| -rw-r--r-- | crop-equirectangular.py | 8 |
1 files changed, 4 insertions, 4 deletions
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) |
