0
from PIL import Image
import stepic
import flask
img = ""
secret = ""
encoded_image = ""

img = input("enter name and extension of image you want to encode: ")
img = img.strip()
img = Image.open



secret = input("Please enter the message you want to encode an image with:  ")

secret = secret.encode()

encoded_image = stepic.encode(img, secret)

encoded_image = input("enter new image name with extension: ")
encoded_image.save

print("Encryption completed ")

When I ran the program it was all good up until It tried to encode the image and it gave me the following errors:

Traceback (most recent call last):
  File "C:/Users/liamj/PycharmProjects/CS104/encode test.py", line 19, in <module>
   
 encoded_image = stepic.encode(img, secret)
  File "C:\Users\liamj\PycharmProjects\CS104\venv\lib\site-packages\stepic\__init__.py", line 103, in encode
    image = image.copy()
AttributeError: 'function' object has no attribute 'copy'

I've tried to encode different image types just incase JPGS weren't supported. Any answer or solution would be greatly appreciated! Thanks.

0 Answers0