Omnibus commited on
Commit
cb433a3
·
1 Parent(s): 7e2da2b

Update stegan.py

Browse files
Files changed (1) hide show
  1. stegan.py +3 -3
stegan.py CHANGED
@@ -41,13 +41,13 @@ def decode(image_name,txt=None):
41
  break
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 base
51
 
52
  def encode(image_name, secret_data,txt=None):
53
  BGRimage = cv2.imread(image_name)
 
41
  break
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 p
51
 
52
  def encode(image_name, secret_data,txt=None):
53
  BGRimage = cv2.imread(image_name)