Last active
January 2, 2016 07:29
-
-
Save AndrewReitz/8270238 to your computer and use it in GitHub Desktop.
Quick and dirty way to add a water mark to all images in a folder.
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 | |
WATERMARK="$1" #1st param image to be the water mark | |
#2nd param is path to folder you want all jpg, jpeg or png to | |
#have the water mark added to | |
for image in $2/*{.jpg,.jpeg,.png} | |
do | |
#gravity is the position the water mark will go | |
#50 is the opacity of the image | |
#the second $image is the output file, currently | |
#this will overwrite the input file, feel free to change to something else | |
#or place in a different directory | |
composite -gravity southeast -dissolve 50 $WATERMARK "$image" "$image" &> /dev/null | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment