blind_watermark icon indicating copy to clipboard operation
blind_watermark copied to clipboard

并发情况下跑的时候会出现数据错乱

Open fucktx opened this issue 3 years ago • 0 comments

楼主好: 我看文档里面 processes: 整数,指定线程数。默认为 None, 表示使用全部线程。 代码如下,定义了一个全局的bwm变量,然后打水印和提取水印都会用到这个bwm


bwm = WaterMark(password_img=1, password_wm=1)
def embeb_watermark(src, dst, hash_id):
    bwm.read_img(src)
    bwm.read_wm(hash_id, mode='str')
    bwmembed(dst)  # 输出a
    len_wm = len(bwm.wm_bit)
    print('Put down the length of wm_bit {len_wm}'.format(len_wm=len_wm))
    return dst

实际测试打完水印后部分图片信息会错乱,覆盖其他数据

fucktx avatar Aug 15 '22 05:08 fucktx