Omnibus commited on
Commit
ebfe974
·
1 Parent(s): 851d81c

Update stegan.py

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