summaryrefslogtreecommitdiff
path: root/live-mogrify.py
diff options
context:
space:
mode:
Diffstat (limited to 'live-mogrify.py')
-rw-r--r--live-mogrify.py12
1 files 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)