from blind_watermark import WaterMark
import os
pwd = "ConnorImageWatermarkEncryption"
def embedding(originalImage, encryptedImage, msg):
bwm1 = WaterMark(password_img=1, password_wm=1)
bwm1.read_img(originalImage)
wm = msg
bwm1.read_wm(wm, mode='str')
bwm1.embed(encryptedImage)
len_wm = len(bwm1.wm_bit)
print('Put down the length of wm_bit {len_wm}'.format(len_wm=len_wm))
if __name__ == "__main__":
os.chdir(os.path.dirname(__file__))
embedding('./test.png', './output/t.jpg', 'This is group1,group1, group-1')
print信息:
Welcome to use blind-watermark, version = 0.4.4
Make sure the version is the same when encode and decode
Your star means a lot: https://github.com/guofei9987/blind_watermark
This message only show once. To close it: blind_watermark.bw_notes.close()
python所执行的源代码:
print信息: Welcome to use blind-watermark, version = 0.4.4 Make sure the version is the same when encode and decode Your star means a lot: https://github.com/guofei9987/blind_watermark This message only show once. To close it:
blind_watermark.bw_notes.close()
Put down the length of wm_bit 239
尝试过管理员模式运行,也试过图片格式为jpg, png, 都没有加密后的图片生成