guofei9987 / blind_watermark

Blind&Invisible Watermark ,图片盲水印,提取水印无须原图!
https://blindwatermark.github.io/blind_watermark/#/en/
MIT License
5.75k stars 683 forks source link

Image quality deterioration problem #86

Open gudh opened 2 years ago

gudh commented 2 years ago

First of all, thanks for sharing this amazing watermark tool!

The problem I came across is that, when I running the example code in the doc

# embed watermark into image:
blind_watermark --embed --pwd 1234 examples/pic/ori_img.jpeg "watermark text" examples/output/embedded.png

the output image (33.2 KB) is twice as large as the original image (17.7 KB), but the quality deteriorates

Is there a way to preserve the image quality?

Thanks!

guofei9987 commented 1 year ago

Use wm.embed(..., compression_ratio=aFloat) to compression the output image.