Created
August 7, 2021 07:25
-
-
Save ilyaglow/b47ae9664b157f7ae8395858bc48cc09 to your computer and use it in GitHub Desktop.
Watermark you ID with ImageMagick before sending to this new shiny app
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
function watermark_doc { | |
text_top="text 10,10 '$2'" | |
text_bottom="text 5,15 '$2'" | |
output_file="${1}_watermarked_$(date +%s).jpg" | |
convert -size 140x80 xc:none -gravity center -fill '#80808080' \ | |
-gravity NorthWest -draw "${text_top}" \ | |
-gravity SouthEast -draw "${text_bottom}" \ | |
miff:- |\ | |
composite -tile - "$1" "${output_file}" | |
open "${output_file}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment