Closed idonkeyliu closed 5 years ago
Jpg format is lossy compression , you'd better use some lossless compression formats like bmp, png, gif.
OK, thank. I'll have a try.
PS C:\Users\panxin\Desktop> python encode.py --image 3d.tif --watermark wm.png --result jm.tif
libpng warning: iCCP: known incorrect sRGB profile
Traceback (most recent call last):
File "encode.py", line 54, in
@pxpy Could you please show me your picture ? My email : xxbbb@vip.qq.com
I was verified that jpeg format supported.
something wrong when I add argument -- alpha
$python encode.py --image ori.jpg --watermark watermark.jpg --result res.jpg --alpha 5
Traceback (most recent call last):
File "encode.py", line 55, in <module>
main()
File "encode.py", line 31, in main
encode(img, wm, res, alpha)
File "encode.py", line 50, in encode
res_f = img_f + alpha * tmp
TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype('S32') dtype('S32') dtype('S32')
@Zola Sorry for that, now I have fixed it.
The Python3 version of the blind watermark can be used, but it has no effect. It is not the image range is wrong or the watermark cannot be loaded. I hope I can fix it, or I need to know which libraries need to be installed.
after decode, Jpg can't see watermark. The pic is a vertical pic.