隐写错误 - 'hex'不是文本编码;使用codecs.encode()来处理任意编解码器

问题描述 投票:0回答:1

我是Steganography的新手。试图做一个测试,我得到这个错误:

 'hex' is not a text encoding; use codecs.encode() to handle arbitrary codecs

我读过有关binascii的内容,但我怎样才能做到这一点?

我的代码就是这个:

from __future__ import absolute_import, unicode_literals
from steganography.steganography import Steganography

path = "/Users/cohen/Desktop/Screenshot_030.png"
output_path = "/Users/cohen/Desktop/output_steganography.png"

text = "/Users/cohen/Desktop/test.txt"

Steganography.encode(path, output_path, text) #---here is the line with error

谢谢!

python steganography
1个回答
1
投票

的确,我也刚刚检查过。该项目与Python 3不兼容。

你可以在GitHub上找到很多很好的简单隐写模块,特别是如果你想测试LSB(最低有效位)技术。例如,这个与Python 3兼容:https://github.com/cedricbonhomme/Stegano

© www.soinside.com 2019 - 2024. All rights reserved.