Spaces:
Runtime error
Runtime error
Update stegan.py
Browse files
stegan.py
CHANGED
|
@@ -42,13 +42,13 @@ def decode(image_name,txt=None):
|
|
| 42 |
break
|
| 43 |
p = decoded_data[:-5].split("#",1)[1].split("#",1)[0]
|
| 44 |
#if p == resultd:
|
| 45 |
-
this = decoded_data[:-5].split("#",1)[0].split("'",1)[1]
|
| 46 |
#base = bytes(this, 'utf-8')
|
| 47 |
#with open(f"finished_im{uniqnum}.png", "wb") as fh:
|
| 48 |
# fh.write(base64.decodebytes(bytes(this, 'utf-8')))
|
| 49 |
#fh.close
|
| 50 |
#return f"finished_im{uniqnum}.png"
|
| 51 |
-
return
|
| 52 |
|
| 53 |
def encode(image_name, secret_data,txt=None):
|
| 54 |
BGRimage = cv2.imread(image_name)
|
|
|
|
| 42 |
break
|
| 43 |
p = decoded_data[:-5].split("#",1)[1].split("#",1)[0]
|
| 44 |
#if p == resultd:
|
| 45 |
+
#this = decoded_data[:-5].split("#",1)[0].split("'",1)[1]
|
| 46 |
#base = bytes(this, 'utf-8')
|
| 47 |
#with open(f"finished_im{uniqnum}.png", "wb") as fh:
|
| 48 |
# fh.write(base64.decodebytes(bytes(this, 'utf-8')))
|
| 49 |
#fh.close
|
| 50 |
#return f"finished_im{uniqnum}.png"
|
| 51 |
+
return p
|
| 52 |
|
| 53 |
def encode(image_name, secret_data,txt=None):
|
| 54 |
BGRimage = cv2.imread(image_name)
|