Created
October 9, 2020 14:19
-
-
Save dhil/20148ee55c888d0f323c86ceb507d972 to your computer and use it in GitHub Desktop.
A script to watermark pictures
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Acknowledgement: this idea is adapted from Raphaël Rigo (https://twitter.com/_trou_/status/1313951783182651393?s=20). | |
if [[ -z "${1+x}" || -z "${2+x}" || -z "${3+x}" ]]; then | |
echo "usage: $(basename $0) <source-file> <text> <output-file>" | |
exit 0 | |
fi | |
convert -density 150 -fill "rgba(255,0,0,0.25)" -gravity Center -pointsize 80 -draw "rotate -45 text 0,0 \"$2\"" "$1" "$3" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment