I'm fairly new to python, and I'm trying out Steganography. I'm using the libraries Stepic and Image to try to encrypt user input messages onto any image. My script will do just fine until the very last step, the encryption onto the image. My error is, "ValueError: Unsupported pixel format: image must be RGB, RGBA, or CMYK" I can't think of anything to try so I've come here. Here is my code:
from PIL import Image
import stepic
i = input("Name of File (With extension): ")
img = Image.open(i)
message = input("Message: ")
message = message.encode()
encoded_img = stepic.encode(img, message)
encoded_img.save(input("Name of encypted image: "))
print("Completed!")