Watermark image with ImageMagick

Published: 2019-10-06 11:03:13 +0000
Categories: 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


# 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



image, watermark, bash, shell, cli,

Latest Posts

Copyright © 2021 Ben Tasker | Sitemap | Privacy Policy
Available at snippets.bentasker.co.uk and http://phecoopwm6x7azx26ctuqcp6673bbqkrqfeoiz2wwk36sady5tqbdpqd.onion