I am trying to encode text into picture and then decode it using stepic module. When i execute below code it gaves me decode error. Kindly, advice how to fix it.
#encode text in photo
from PIL import Image
import stepic
im=Image.open("beer.jpg")
im2=stepic.encode(im,"In god we trust")
im2.save("stegbeer.jpg","JPEG")
#decode text from photo
im1=Image.open("stegbeer.jpg")
s=stepic.decode(im1)
data=s.decode()
print data
Error: Traceback (most recent call last): File "C:\Users\xxxx\Desktop\Python\steganography\all.py", line 11, in data=s.decode() UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)