Want to watermark your images in an automated fashion using command line tools?

flower-yellow-rock-watermarked.png

The Technique

Prerequirements:

Start with by creating a PNG image with alpha channel that represents the overlay that you want.

watermark.png (219x42)

watermark.png

Use the composite tool from ImageMagick to apply the watermark.png image onto the original image to produce the desired effect.

$ composite -gravity SouthEast watermark.png original-image.png output-image.png

Here's how to take a directory full of PNG files and add a copymark to each.

for PNG in *.png
do
  echo Adding watermark to $PNG
  composite -gravity SouthEast watermark.png $PNG ${PNG//.png}-watermarked.png
done