From 4a05da65c767c81182d107cc931b7e6caf333ed7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 21 May 2018 03:41:03 +0200 Subject: un rato --- live-mogrify.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/live-mogrify.py b/live-mogrify.py index eaa1bb1..70f508c 100644 --- a/live-mogrify.py +++ b/live-mogrify.py @@ -164,13 +164,13 @@ def process_live_input(opt, data_opt): if A_dir is not None: sequence_path = A_dir.format(A_offset+i+1) - if opt.send_image == 'b': + if data_opt.send_image == 'b': image_pil = Image.fromarray(im, mode='RGB') rpc_client.send_pil_image("frame_{:05d}.png".format(i+1), image_pil) - if opt.store_a is not True: + if data_opt.store_a is not True: os.remove(last_path) - if opt.store_b is True: + if data_opt.store_b is True: image_pil = Image.fromarray(im, mode='RGB') image_pil.save(tmp_path) os.rename(tmp_path, current_path) @@ -212,12 +212,12 @@ def process_live_input(opt, data_opt): next_img = process_image(opt, data_opt, next_im) - if opt.send_image == 'sequence': + if data_opt.send_image == 'sequence': rpc_client.send_pil_image("frame_{:05d}.png".format(i+1), A_img) - if opt.send_image == 'recursive': + if data_opt.send_image == 'recursive': pil_im = Image.fromarray(next_im) rpc_client.send_pil_image("frame_{:05d}.png".format(i+1), pil_im) - if opt.send_image == 'a': + if data_opt.send_image == 'a': rgb_im = cv2.cvtColor(next_img, cv2.COLOR_BGR2RGB) pil_im = Image.fromarray(rgb_im) rpc_client.send_pil_image("frame_{:05d}.png".format(i+1), pil_im) -- cgit v1.2.3-70-g09d2