has12zen
commited on
Commit
•
d1836d1
1
Parent(s):
d29aad7
Greyscale to rgb support
Browse files
utils.py
CHANGED
@@ -2,6 +2,7 @@ from PIL import Image
|
|
2 |
|
3 |
def encrypt(text, secret_key, img):
|
4 |
image = Image.fromarray(img)
|
|
|
5 |
pixels = list(image.getdata())
|
6 |
binary_text = ''
|
7 |
for char in text:
|
|
|
2 |
|
3 |
def encrypt(text, secret_key, img):
|
4 |
image = Image.fromarray(img)
|
5 |
+
image = image.convert('RGB')
|
6 |
pixels = list(image.getdata())
|
7 |
binary_text = ''
|
8 |
for char in text:
|