Advertisement
jcomeau_ictx

simple watermark script

Aug 5th, 2013
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #!/bin/bash
  2. # from http://www.imagemagick.org/Usage/annotating/
  3. # requires ImageMagick!
  4. if [ "$2" ]; then marked_up="$2"
  5. else marked_up="$(dirname "$1")/watermarked_$(basename "$1")"
  6. fi
  7. if [ "$3" ]; then markup=$3; else markup="author@photography.com"; fi
  8. if [ "$4" ]; then location=$4; else location=southwest; fi
  9. convert -size 200x14 xc:none -gravity center \
  10. -stroke black -strokewidth 2 -annotate 0 "$markup" \
  11. -background none -shadow 100x3+0+0 +repage \
  12. -stroke none -fill white -annotate 0 "$markup" \
  13. "$1" +swap -gravity $location -geometry +0-3 \
  14. -composite $marked_up
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement