Watermark image with ImageMagick (BASH)
Watermarking images by hand is a pain, it's a lot easier to drop a bunch of images into a directory, and watermark them using imagemagick. This snippet details the command to use
Details
- Language: BASH
Snippet
# If you don't already have one,
# You can generate a watermark file with
convert -size 300x50 xc:none -font Arial -pointsize 20 -gravity center -draw "fill white text 1,1 'Copyright B Tasker' text 0,0 'Copyright B Tasker' fill black text -1,-1 'Copyright B Tasker' " WATERMARK_FILE.png
# Burn the watermark into the image in the bottom right corner
composite -dissolve 90% -gravity south-east $WATERMARK $INPUT $OUTPUT
# Gravities:
#
# South: bottom of image
# South-West: bottom left
# West: Centre left
# North-West: top left
# North: top
# North-East: Top right
# East: Centre right
# South-East: bottom right
Usage Example
composite -dissolve 90% -gravity south-east watermark.png DSC0143.jpeg DSC0143_wm.jpg