Commit 6727cfd5 authored by Floris Valentijn's avatar Floris Valentijn
Browse files

Delete message_decoder.py

parent 6e51e735
from PIL import Image
import numpy as np
img = np.array(Image.open('encoded_beemovie.png'))
# Extract message out of the red color of the image
secret = []
for row in img:
for col in row:
R = col[0]
secret.append(format(R, '08b')[-1])
message = ''.join(secret)
i = 0
test_list = []
# Convert the byte string to a string of characters
while i < len(message):
letter = chr(int(message[i:i + 8], 2))
if int(message[i:i + 8], 2) == 0:
break
test_list.append(letter)
i += 8
print(letter, end="")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment