• A bash script to watermark all the images in a folder (ubuntu, imagemagick, svg)

    by  • 13 gennaio 2012 • tutorial • 3 Comments

    Hello, this time something a bit “nerdy”, i need a script to watermark a batch of images, prior to upload them on Flickr, but all the scripts i’ve found, using ImageMagick, uses a fixed width image and watermark.

    My idea is to automatically resize the watermark to about 50% the width of the image and the apply it.

    This simple script just browse all the files in a folder, with a specific extension (ie *.jpeg, *.JPG, etc) and first read the width of the image, then resize the watermark to the correct size (50%) and then apply it, saving the new image with the same name but in a subfolder.

    Please note, to work this scripts needs that you’ve installed ImageMagick and optionally Zenity and was tested with Ubuntu 11.04.

    If you put this script in your home_folder/.gnome2/nautilus_scripts then you can access it just right-clicking inside the folder with your images and choosing the script in the “scripts” menu

    3 Responses to A bash script to watermark all the images in a folder (ubuntu, imagemagick, svg)

    1. 18 settembre 2012 at 23:01

      Hey, great script but how about a little change: if the image is landscape apply watermark landscape.png and if image is portrait apply portrait.png?

      Is this possible? How would you do it?
      Thanks,
      Alex

      • 19 settembre 2012 at 17:45

        Hello Alex! Maybe i can try to think about it ASAP.

        Greetings,
        Alessio

    2. Pingback: Inserire un watermark con ImageMagick | BashScript

    Lascia un Commento