diff --git a/decode.py b/decode.py index 7bacb89..7a1e0e2 100644 --- a/decode.py +++ b/decode.py @@ -179,4 +179,5 @@ else: for frame in frames: print('.') - Image.fromarray(np.frombuffer(frame, dtype='>H').reshape(WIDTH, HEIGHT)).save(f'live.png') + Image.fromarray(np.frombuffer(frame, dtype='>H').reshape(WIDTH, HEIGHT)).save(f'live.new.png') + os.rename('live.new.png', 'live.png') diff --git a/run_live.sh b/run_live.sh new file mode 100755 index 0000000..5974e66 --- /dev/null +++ b/run_live.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd $(dirname $0) +sudo ./venv/bin/python ./decode.py --live