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.
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI 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.
Use imagemagick
:
Imagemagick's own watermarking tutorial. Watermarking a single image looks like
convert logo.jpg -font Arial -pointsize 20 \
-draw "gravity south \
fill black text 0,12 'Copyright' \
fill white text 1,11 'Copyright' " \
wmark_text_drawn.jpg
For dealing with multiple images, see How to automatically watermark or batch watermark photos using ImageMagick.
logo.jpg
with "${i}"
: for i in *jpg ; do convert "${i}" -font ....... ; done
May 5, 2014 at 12:31
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.
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:
Download the script
Save the downloaded file to your GIMP install followed by \share\gimp\2.0\scripts.
For Windows users Start -> Run… -> Cmd
(hit OK)
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\")"
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
cd /Users/joonas/Desktop/pictures/
= navigates to given path
-path /Users/joonas/Desktop/modified_pictures
= Defines destination path
-resize 600">"
">"
after the width value to make sure that only image with larger width than 600px are resized to
600px. -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}
text
, image
Over
, overlay
, multiply
, more..10,10
0,0
{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.
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.IrfanView has this ("Add watermark image")
File -> Batch conversion / rename -> Advanced
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.
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 :
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 ;)
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.