image-processingcommand-linewatermark

How to add watermarks to images via command line - Hopefully using Irfanview


I have done a bit of digging and i havn't been able to find any feasible way of adding watermarks to my 1000+ images automatically. Is this possible with irfanview?? What im looking for is just some basic transparent text overlaying across each image. Can this be done using command line? Is it possible to go one step further and add a logo watermark?

Can you recommend any other programs rather than irfanview to do this, if its not possible to do it in this program.


Solution

  • I recommend using ImageMagick, which is open source and quite standard for manipulating images on the command line.

    Watermarking with an image is as simple as

    composite -dissolve 30% -gravity south watermark.jpg input-file.jpg output-file.jpg
    

    With text, it's a little more complicated but possible.

    Using the above command as an example, a Bash command for doing this to all files in folder would be:

    for pic in *.jpg; do
        composite -dissolve 30% -gravity south watermark.jpg $pic ${pic//.jpg}-marked.jpg
    done
    

    For more information about watermarking with ImageMagick, see ImageMagick v6 Examples.