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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e62378f6e0e489e41712e033478263a161b27f08f84d28952e26840a3d07c364
|
|
| MD5 |
002c0ad030a140879aa8d051a25904a3
|
|
| BLAKE2b-256 |
fb71e9edcaab18a58ffff3f79d5e66d6ea70b618cc595cb2c33b13868238d2f5
|
File details
Details for the file pyinvisiblewatermark-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyinvisiblewatermark-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.13 Darwin/22.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
586f1746325ba4b2c64442344ccde5b6757da402a0be71c8b204c242bb607ca6
|
|
| MD5 |
c164e4f980fa7a683c7b7f6d42b39e6e
|
|
| BLAKE2b-256 |
f2174995e18eabfaabf52dcb6d9d1f127c67e9e746d65f96a335be8d7d5ba297
|