summaryrefslogtreecommitdiff
path: root/crop-equirectangular.py
diff options
context:
space:
mode:
Diffstat (limited to 'crop-equirectangular.py')
-rw-r--r--crop-equirectangular.py8
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)