watermark
给图片添加文字水印,支持设置文字内容、大小、透明度、颜色、旋转等
效果图
安装配置
安装 Pillow:
pip install Pillow
使用
例子:
python3 watermark/watermark.py -m '测试水印' -f weixiaobao.jpg
具体使用参数介绍:
运行 python3 watermark.py -h
usage: watermark.py [-h] [-f FILE] [-m MARK] [-o OUT] [-c COLOR] [-s SPACE]
[-a ANGLE] [--size SIZE] [--opacity OPACITY]
给图片添加文字水印,支持设置文字内容、大小、透明度、颜色、旋转等
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE image file path or directory
-m MARK, --mark MARK watermark content
-o OUT, --out OUT image output directory, default is ./output
-c COLOR, --color COLOR font color like '#000000', default is #F4F4F4
-s SPACE, --space SPACE space between watermarks, default is 60
-a ANGLE, --angle ANGLE rotate angle of watermarks, default is 30
--size SIZE font size of text, default is 25
--opacity OPACITY opacity of watermarks, default is 0.4
Metadata
Release files for watermark2 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| watermark2-1.0.3.tar.gz | 3.6 kB | Without provenance | Details for watermark2-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| watermark2-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for watermark2-1.0.3-py3-none-any.whl |
Total release size: 8.5 kB
Release files / watermark2-1.0.3.tar.gz
| Download URL | watermark2-1.0.3.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f623226326bfd526fbcdcda24ea6f91afa108633435f4bc31554428881423477
|
|
BLAKE2b-256 checksum How to use checksums |
54f6b98f0e0afef1a7c6184e28409766a6966b5ec2548507f7293aa8a81f1eb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
|
Release files / watermark2-1.0.3-py3-none-any.whl
| Download URL | watermark2-1.0.3-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d64363045bb1aa3c4bb0f8314f2c8a04527b4cbea187910887da1931885c777
|
|
BLAKE2b-256 checksum How to use checksums |
cb9acd9b7a03ad757cc90b339ec23672dd0ad9f5fab5b1ddd9c9b95d832a2b8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
|
Security for watermark2 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.