Skip to main content

No project description provided

Project description

图片隐水印生成/解码

复刻https://invisiblewatermark.net/的python版本实现。

算法原理,参见:https://invisiblewatermark.net/how-invisible-watermarks-work

安装

pip3 install pyinvisiblewatermark

使用

命令行使用

# encode
ivwm encode "hello world!" $YOUR_IMAGE_PATH

# decode
ivwm decode $INPUT_IMAGE_PATH $OUTPUT_IMAGE_PATH

代码使用

# encode
import invisiblewatermark as ivwm

ivwm.generate_watermark(
    img_fp="data/origin.png",
    wm_txt="hello world!",
    save_to="data/encode.png",
    font="font/ZiTiQuanWeiJunHei-W1-2.ttf"
)
# decode
import invisiblewatermark as ivwm

# 图片加水印示例
ivwm.extract_watermark(
    img_fp="data/encode.png",
    save_to="data/decode.png"
)

效果示例

原图 加水印图 水印解码图 水印文本
hello world!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyinvisiblewatermark-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyinvisiblewatermark-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file pyinvisiblewatermark-0.1.0.tar.gz.

File metadata

  • Download URL: pyinvisiblewatermark-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.13 Darwin/22.3.0

File hashes

Hashes for pyinvisiblewatermark-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e62378f6e0e489e41712e033478263a161b27f08f84d28952e26840a3d07c364
MD5 002c0ad030a140879aa8d051a25904a3
BLAKE2b-256 fb71e9edcaab18a58ffff3f79d5e66d6ea70b618cc595cb2c33b13868238d2f5

See more details on using hashes here.

File details

Details for the file pyinvisiblewatermark-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyinvisiblewatermark-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 586f1746325ba4b2c64442344ccde5b6757da402a0be71c8b204c242bb607ca6
MD5 c164e4f980fa7a683c7b7f6d42b39e6e
BLAKE2b-256 f2174995e18eabfaabf52dcb6d9d1f127c67e9e746d65f96a335be8d7d5ba297

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page