diff options
Diffstat (limited to 'crop-equirectangular.py')
| -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 16f19da..d574b2a 100644 --- a/crop-equirectangular.py +++ b/crop-equirectangular.py @@ -57,13 +57,13 @@ os.makedirs(path_1) os.makedirs(path_2) for i, fn in enumerate(glob.glob(os.path.join(opt.folder, '*.png'))): - fn = "frame_{:04d}.png".format(i) + out_fn = "frame_{:04d}.png".format(i) canvas = Image.new('RGB', (src_width, int(src_height * 3/2),)) image = Image.open(fn) canvas.paste(image, (0, 0)) canvas.paste(image, (src_width, 0)) - canvas.crop(p0).resize((1024, 512,), Image.ANTIALIAS).save(os.path.join(path_0, fn)) - canvas.crop(p1).resize((1024, 512,), Image.ANTIALIAS).save(os.path.join(path_1, fn)) - canvas.crop(p2).resize((1024, 512,), Image.ANTIALIAS).save(os.path.join(path_2, fn)) + canvas.crop(p0).resize((1024, 512,), Image.ANTIALIAS).save(os.path.join(path_0, out_fn)) + canvas.crop(p1).resize((1024, 512,), Image.ANTIALIAS).save(os.path.join(path_1, out_fn)) + canvas.crop(p2).resize((1024, 512,), Image.ANTIALIAS).save(os.path.join(path_2, out_fn)) |
