Here comes the Linux way (assuming imagemagick
is installed):
composite -dissolve 30% -gravity SouthEast -quality 100 logo.png in.jpg out.jpg
There is also ImageMagick for Windows, I guess.
Here comes a quick explanation of the command:
composite
- Command we execute, part of the IM suite
-dissolve 30%
- Give the watermark an opacity of 30%
-gravity SouthEast
- Locate watermark in bottom-right (possible values here)
-quality 100
- Quite obvious, the JPEG quality for the output
logo.png
- Your watermark, thanks to -dissolve
, doesn't have to be opaque
in.jpg
- The original image that you wish to watermark
out.jpg
- The filename of the result image
Now let's write a quick bash script to watermark every image in the folder originals
:
#!/bin/bash
for i in originals/*; do
composite -dissolve 30% -gravity SouthEast -quality 100 logo.png "$i" "results/$(echo $i | cut -d '/' -f 2)"
done
Execute this in a folder containing your logo.png
as watermark, a folder originals
with your input images, and an empty folder called results
where the modified images will be saved in.