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 pyinvisiblewatermark 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 pyinvisiblewatermark 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.1.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.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyinvisiblewatermark-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 21b00646519d1b8b315ec9e771820c81ddf939b718f008a350f63b10d4d85c14
MD5 c8a79b63f31852394c172b0c91add10e
BLAKE2b-256 dafac3821b9e78260d8738ec50790643d24303537ea47c9beccee90e9f72faf9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyinvisiblewatermark-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c70963e0dc7feeeeed50ec783f702aa38037adf9e2fbdc36ed07828ab95ea83c
MD5 a0d4b584d9830b2fa8f07aa3cda2fba5
BLAKE2b-256 e339f31aef308a6fe1ab54f7f523b7c713617fc3a2c8373bb3d23e16e014aeab

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