Created
August 19, 2018 20:41
-
-
Save ideadapt/855b44ec14706e800855a6032625cc9d to your computer and use it in GitHub Desktop.
Watermarks all images selected in MacOS Finder application with a transparent logo overlay
This file contains 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
#!/bin/bash | |
exec 2>&1 | |
export PATH=/usr/local/bin:$PATH | |
for image in "$@" | |
do | |
if [ -s "$image" ]; then | |
filename=$(basename "$image") | |
dirname=$(dirname "$image") | |
mkdir -p "$dirname"/watermarked | |
output="${dirname}/watermarked/${filename}" | |
composite -dissolve 50% -gravity southwest -geometry +10+10 \ | |
~/.watermark/logo_page_transparent.png "$image" "$output" | |
echo "watermarked $output" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment