Spaces:
Running
Running
Update utils.py
Browse files
utils.py
CHANGED
@@ -35,7 +35,7 @@ def decode(image_name,txt=None):
|
|
35 |
|
36 |
def encode(image_name, secret_data,txt=None):
|
37 |
msg=""
|
38 |
-
BGRimage = cv2.imread(image_name)
|
39 |
image = cv2.cvtColor(BGRimage, cv2.COLOR_BGR2RGB)
|
40 |
n_bytes = image.shape[0] * image.shape[1] * 3 // 8
|
41 |
print("[*] Maximum bytes to encode:", n_bytes)
|
|
|
35 |
|
36 |
def encode(image_name, secret_data,txt=None):
|
37 |
msg=""
|
38 |
+
BGRimage = cv2.imread(f"{image_name}")
|
39 |
image = cv2.cvtColor(BGRimage, cv2.COLOR_BGR2RGB)
|
40 |
n_bytes = image.shape[0] * image.shape[1] * 3 // 8
|
41 |
print("[*] Maximum bytes to encode:", n_bytes)
|