Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jmbill

macrumors member
Original poster
Dec 17, 2008
51
0
I've got a large folder of photographs which I want to batch-watermark. I want to batch-watermark each image with its filename e.g "image_01.jpg" for easy reference.

I thought this would be really easy to do, but after searching the internet and various forums, I have not been able to find a solution. I thought this would be a perfect job for Automator, but after a few hours of trying it seems this is beyond the ability of Automator. I already own a copy of iWatermark, but this has no option for what I want to do. I do not own Photoshop CS, but I do have Photoshop Elements 4, and Pixelmator, plus a few other basic editing applications.

Does anyone know of a basic freeware application or script that can do what I'm looking to do?
 

EugeneA

macrumors newbie
Feb 1, 2008
22
0
Try ImageMagick, if you are brave...

If you are not afraid of command line, you can use ImageMagick
to do what you want:

First, install macport from http://www.macports.org.
Once Macport is installed, open a terminal and install ImageMagick:

sudo port install ImageMagick

It will take a bit of time....

And now you are ready for images:

In the directory with images, type:

for nm in *.JPG *.jpg; do mogrify -fill white -pointsize 50 -draw "text 0,50 $nm" $nm; done

Remember, this will modify your images in place! Make a backup before experimenting, or use convert instead of mogrify!

Modify the options to mogrify to suit your taste. You can do just about anything with your images with this toolkit.

Check out http://www.imagemagick.org for documentation
on ImageMagick. It's super powerful toolkit for batch manipulation of images. I use it all the time.

Attached is an example of running this script. It's just a starting point, play with the options to get better font, color, text location etc.
 

Attachments

  • iris.jpg
    iris.jpg
    81.7 KB · Views: 240

jmbill

macrumors member
Original poster
Dec 17, 2008
51
0
If you are not afraid of command line, you can use ImageMagick
to do what you want:

First, install macport from http://www.macports.org.
Once Macport is installed, open a terminal and install ImageMagick:

sudo port install ImageMagick

It will take a bit of time....

And now you are ready for images:

In the directory with images, type:

for nm in *.JPG *.jpg; do mogrify -fill white -pointsize 50 -draw "text 0,50 $nm" $nm; done

Remember, this will modify your images in place! Make a backup before experimenting, or use convert instead of mogrify!

Modify the options to mogrify to suit your taste. You can do just about anything with your images with this toolkit.

Check out http://www.imagemagick.org for documentation
on ImageMagick. It's super powerful toolkit for batch manipulation of images. I use it all the time.

Attached is an example of running this script. It's just a starting point, play with the options to get better font, color, text location etc.

I've installed MacPorts and Installed ImageMagick via Terminal.

What I'm doing is dragging the folder named 'images_to_watermark' from my Desktop into a new Terminal window to create the path to the directory. Then I am pasting or manually typing your code after the directory address and hitting return.

But I'm getting a "-bash: syntax error near unexpected token `do' " error in Terminal and the images are not being processed.

Any ideas?
 

Attachments

  • terminal.jpg
    terminal.jpg
    37 KB · Views: 195

EugeneA

macrumors newbie
Feb 1, 2008
22
0
ImageMagick

You need to change into the directory with images before running my commands. Type "cd" in the terminal and then drag the directory into the terminal. Press "return" and it should change to the directory with images. After that try the commands. But remember that images will be changed in place. Please, please, please back them up before trying.
See the image below. You can safely ignore the error about *.JPG, all images I have are *.jpg.
 

Attachments

  • picture.jpg
    picture.jpg
    69 KB · Views: 200

jmbill

macrumors member
Original poster
Dec 17, 2008
51
0
Thanks - works perfectly! As you can tell, I'm still a bit of a learner when it comes to Terminal, but this will be something else I can add to the "I can do this in Terminal" list! :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.