29

I have around 15,000 JPG files that need to be watermarked. Is there any way to process these images en masse and add a watermark?

The images may be different sizes, I want the watermark placed in the center of the images.

25

Use imagemagick:

  • for i in *jpg ; do convert logo.jpg [ above code ] ; done – Shadur Apr 27 '14 at 11:47
  • for those using @Shadur example: Of course, replace logo.jpg with "${i}" : for i in *jpg ; do convert "${i}" -font ....... ; done – Olivier Dulac May 5 '14 at 12:31
23

Yes, in Photoshop you could batch process the images in a folder using an action.

Simply:

  • Open the image

  • Open the "Actions" panel and hit "Create new action".

  • Name the action and hit "Ok"

  • You should now be in record. Most anything you do will be logged in the action as a step until you hit the "Stop" button in your actions toolbar menu.

  • Create your watermark as you normally would. I recommend using a mixture of pattern and opacity. Save the image to the desired format and location.

  • Close the image and hit "Stop"

Now, go to File >> Automate >> Batch, and select your newly created action and the source folder containing the images you want to modify. This will apply that action to all images in that folder.

There are file naming options and some other extras should you choose to use them.

  • Then you would have to actually open them all, no? – benteh Apr 24 '14 at 0:35
  • 3
    Technically, the batch automation will open and close the files automatically so long as your last step in your action is "close". Set it, and forget it.... – cclark413 Apr 24 '14 at 0:39
  • Can also save this as a Droplet – Ryan Apr 24 '14 at 13:58
17

There is a Gimp script that is specifically designed to add watermarks: Batch Image Watermark Script. It need to be run through the command line, but it is quite straightforward:

  1. Download the script

  2. Save the downloaded file to your GIMP install followed by \share\gimp\2.0\scripts.

  3. For Windows users Start -> Run… -> Cmd (hit OK)

  4. Type cd followed by your GIMP directory (i.e. cd “C:\Program Files\GIMP 2\bin”)

Its commands include input files, watermark path, size, padding and layer mode, position number and output path.

Examples:

gimp-2.8.exe -b "(migee-add-watermark watermark-path inputfiles watermark-size watermark-padding watermark-layer-mode position output-dir)"

and

gimp-2.8.exe -b "(migee-add-watermark \"C:\Users\Migee\Desktop\WatermarkTest\watermark.xcf\" \"C:\Users\Migee\Desktop\WatermarkTest\*.jpg\" .25 .01 15 5 \"C:\Users\Migee\Desktop\WatermarkTest\")"

  • I used something similar to this for Resizing pictures in bulk but it had a user interface, is there anything like that for the batch Image Watermark Script? – Malachi Apr 24 '14 at 17:02
12

ImageMagick answers have pretty much already been given at this point, but I wanted to give a little more detailed answer, so that everyone should be able to use it.


Example with dummy paths: Which you will have to replace.

( On a mac and windows you can drag a file or folder to terminal window, which will convert into a path )

Make sure the destination folder exists before running the mogrify... line

cd {path_to_source_folder}

mogrify -path {path_to_destination_folder} -resize 600">" -draw "image Over 10,10 0,0 '{path_to_watermark}' " -gravity SouthEast -quality 90 -format jpg *

Same code with full example paths: Paths to my desktop in Mac.

cd /Users/Joonas/Desktop/pictures/

mogrify -path /Users/joonas/Desktop/modified_pictures -resize 600">" -draw "image Over 10,10 0,0 '/Users/Joonas/Desktop/watermark.png' " -gravity SouthEast -quality 90 -format jpg *

Completely optional parts:

  • -resize 600">"
  • -gravity SouthEast"
  • -quality 90

What it all means

  • cd /Users/joonas/Desktop/pictures/ = navigates to given path


  • -path /Users/joonas/Desktop/modified_pictures = Defines destination path

  • -resize 600">"
    • In the code I have ">"after the width value to make sure that only image with larger width than 600px are resized to 600px.
    • Value examples:
      • 200 = resizes width to 200px ( keeps aspect ratio )
      • x200 = resizes height to 200px ( keeps aspect ratio )
      • 300x300 = resizes to 300x300px size
  • -draw "image Over 10,10 0,0 '/Users/Joonas/Desktop/watermark.png' " - This creates the watermark.

    • -draw structure is this: -draw {type} {compose-method} {location/offset} {size} {filepath}

      • type values: text, image
      • compose-method values: Over, overlay, multiply, more..
      • location/offset values: 10,10
        • You can use gravity to set general location and then this to offset it.
      • size values: 0,0
        • 0,0 = retains original size. 200,200 would be width 200% and height 200%.
      • filepath: Text string. {type} determines how this will be used. If type is image, this will be considered to be a path. If type is text, this will be considered to be text
  • -gravity SouthEast - Defines the general location for watermark.

    • Values: North, NorthEast, East, SouthEast, South, SouthWest, West, Center.
  • -quality 90 - values: 0-100
  • -format jpg * - destination fileformat. The * looks for every filetype in the folder. You could specify something like -format jpg *.png to convert all png files to jpg.

6

IrfanView has this ("Add watermark image")

File -> Batch conversion / rename ->  Advanced

IrfanView batch

enter image description here

5

Yes:

What you want to explore is ImageMagick, an extremely powerful tool for image manipulation.

It is based on command line, but in short: you have a folder (or folders containing folders containing folders etc), and one command on command line will generate all your images with watermarks, in a folder structure of your choice.

  • 5
    Could you maybe add an example command line command to add a watermark? Now it puts the OP on the right track, but the answer is quite general. – Saaru Lindestøkke Apr 24 '14 at 5:40
4

Xnview have very flexible and powerful (and easy to use) batch capabilities

It comes in many forms, including a portable version [for example, on portableapps.com, or others]

When in the "browser view" (ie, not viewing a specific image, but a folder) select (ctrl+click, or shift+click) a bunch of images, and then ctrl+U to open the batch-processing dialog box :

  • the first tab is to describe which files to act upon, where to save them, if you want a copy, backups, etc,
  • and the 2nd tab is to choose which transformations to do [resizing, etc], and everything will be done in the order you choose.
    • Watermark is in the 'Image' section of that "transformation" tab. Very powerful and flexible, and quite easy to use
  • You can also save settings for not having to re-choose folders/transformations each time.
2

Photoshop lightroom has loads of batch process functions on it.

I've set ones up in the past to crop, set the meta data, watermark, and export 250+ images in a chosen file format. Setting up the library etc to start with is a bit of a faff for a one off but it was written with this sort of thing in mind, unlike GIMP. If you wont be needing to do this again soon just use the free trial ;)

  • 1
    Hi bhiqa! Welcome to GDSE! Can you please add a bit more detail to your answer? Perhaps show some samples of the batch code, or what menu actions would they select. As it stands your answer seems to be more of a comment. – ckpepper02 Apr 24 '14 at 14:51
  • @ckpepper02 There's no batch code in Lightroom – the entire product is organized around batch operation workflows. It's a bit difficult to explain if you're accustomed to image editors instead of workflow editors, but it's pretty obvious when the product is in front of you. (That said, it would be a good idea to point out the specific export option that applies watermarks.) – Bradd Szonye Apr 27 '14 at 4:20
0

I use a program called Ashampoo Photo Commander, which has a great and easy to use Batch Processing facility that gets the jkb done easily. It is sometimes given away free on cover disks, is not expensive even if you want the mosr recent released version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.