Skip to content

Add a watermark to a bunch of images

The Problem: You have a bunch of images (like files in an directory ;-)) you want to add with a watermark.

The Solution (an easy one):

!/bin/sh mkdir withLogo for f in *.jpg do composite -gravity SouthEast -watermark 25% ~/path/to/my/watermark.png $f withLogo/$f done

As far as you see, this shell script creates a directory called "withLogo" and walks to every file with the ending "jpg". The script combines every file with the "~/path/to/my/watermark.png" file saves it into "withLogo". Just change in the directoy with the images you want to add with a watermark and type in "sh path/to/my/combine/script.sh". If the command "composite" is not on your system, try to install "imagemagick".