Sunday, August 2, 2009

Watermarking with Lightroom and ImageMagick


Someone gave me a friendly reminder that I should update my watermark today. The watermark I had been using appears at the bottom of an image, which is easy to crop. Given my unending faith in humanity, I suspected that everyone would retain the original copyright notification, but my faith was, once again, misplaced. As a result, the watermark you see above will now be a central feature of most of my posted images. The rest of this entry explains how to put together something like this yourself using Lightroom 2.4 (LR) and ImageMagick (IM).

The fact is that LR will watermark images for you automatically when you export them, but boy is it ugly. IM affords a plethora of possibilities (and perhaps even a plethora of piƱatas if you ask nicely), all of which may be accessed from the command line by telling LR to execute a simple batch file after an export. Start by downloading and installing IM if you haven't done that already. Now locate the folder to which LR will export and create a new text file there called watermark.bat. Right-click on that file and select Edit, which should open a blank document in Notepad. Copy the following text into this file, save it, and close it:

:BEGIN
IF _%1 == _ goto END
CALL composite -compose screen Watermark.psd %1 %1
SHIFT
GOTO BEGIN
:END

This code is based on the code I found here. Watermark.psd may be replaced with any image you like and IM will use it as a watermark after we add some post-processing in LR. Let's do that now. With an image or three selected, open the export dialog in LR and scroll all the way down to the bottom where it says Post-Processing. Select Open in Other Application ... and then select the batch file you just created. Click Export and voila. If you'd like more options for combining your watermark with your exported images, refer to the IM site above or do a search as there are literally thousands of helpful tips available for this tool. In the meantime, I'll work on restoring said faith.