| Crates.io | watermark-cli |
| lib.rs | watermark-cli |
| version | 1.2.0 |
| created_at | 2025-05-18 23:11:40.208678+00 |
| updated_at | 2026-01-20 09:36:20.193572+00 |
| description | A command-line tool for adding watermarks to images with support for batch processing and various watermark patterns |
| homepage | |
| repository | https://github.com/chianti-ga/watermark-cli |
| max_upload_size | |
| id | 1679009 |
| size | 278,881 |
A command-line tool for adding watermarks to images and PDFs with support for batch processing and various watermark patterns. Designed to prevent identity theft and unauthorized copying of official documents through visible watermarking.
cargo install watermark-cli
windows-sys require some dll to build:
scoop install binutils
git clone https://github.com/chianti-ga/watermark-cli.git
cd watermark-cli
cargo build --release
watermark-cli <INPUT_PATH> <WATERMARK> [OPTIONS]
<INPUT_PATH> - Path to the input image/pdf file or directory<WATERMARK> - Text to use as watermark-c, --compression <COMPRESSION> - JPEG quality (1-100) [default: 90]-t, --text-scale <TEXT_SCALE> - Watermark text scale [default: 0.05"]-s, --space-scale <SPACE_SCALE> - Vertical spacing between watermarks [default: 1.5]-r, --recursive - Recursively apply watermark to all images in the specified directory-p, --pattern <PATTERN> - Pattern of
watermark [default: diagonal] [possible values: diagonal, horizontal, vertical, random, cross-diagonal] (NOT
IMPLEMENTED AT THE MOMENT)-h, --help - Print help-V, --version - Print versionApply a diagonal watermark to a single image:
watermark-cli sample.png "ONLY FOR IDENTITY VERIFICATION BY RENTAL AGENCY"
| Original file | Watermarked file |
|---|---|
![]() |
![]() |
Customize watermark height/scale and compression:
watermark-cli --text-scale 2.0 path/to/image.jpg "SAMPLE"
Process all images in a directory recursively with a custom pattern:
watermark-cli --recursive --pattern horizontal path/to/directory/ "Confidential"
Customize watermark spacing and compression:
watermark-cli --space-scale 2.0 --compression 80 path/to/image.jpg "SAMPLE"
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
This project uses the Open Sans font, which is licensed under the SIL Open Font License, Version 1.1 . The font was designed by Steve Matteson and is available at https://fonts.google.com/specimen/Open+Sans.