Watermark export action for Adobe Lightroom

20090127_watermark_1I watermark my photos in my photoblog using a little script (yes, I know this…). My workflow so far was

  1. export the photos from Lightroom
  2. open finder, go to the export directory
  3. open a shell in the directory
  4. run my watermark-script for the exported pictures

Well, this is annoying. But there is a gentle solution: Platypus! This great piece of software turns every Shell/Python/Perl/Whatever script into a little Mac-Application which can be used as export action in Lightroom.

To create your own export action using Platypus, just open the application and point it to the script path using the „Select“ button. Platypus is smart and will fill in more essentials:

20090127_platypus_1

Now press the „Create“ button and select the Lightroom Export Actions directory. It is usually
/Users/yourname/Library/Application Support/Adobe/Lightroom/Export Actions
Open Lightroom, select the pictures you want to export and press the Export-button (or Command Shift E). At the bottom of the export dialog you find the postprocessing options. The „after export“ combobox should now display the newly created export action:

20090127_export_action

Now press „export“ and watch what happens:
20090127_exporting

That’s it. Great isn’t it? 🙂 Here is my watermark-script. It needs exiv2 and imagemagick:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/python
 
import sys
import re
import os
import subprocess
import string
import shutil
 
# path exiv2 executable
EXIVBINARY="/usr/local/bin/exiv2"
# path composite executable (from imagemagick)
COMPOSITEBINARY="/opt/local/bin/composite"
# watermark image
WATERMARKFILE="/Users/melle/Pictures/watermark/Watermark2.png"
 
for filename in sys.argv[1:]:
 
    if not os.path.exists(filename):
        print filename + " does not exist!"
        continue
 
    # extract some strings from the filename
    pathRe = re.compile( '^.*\/')
    plainFilename   = pathRe.sub( '', filename)
    baseFilename    = string.replace(plainFilename, ".jpg", "")
    newFilename     = "mark_" + plainFilename
    newMetaFilename = "mark_" + re.compile('\.[jJ][pP][gG]').sub('.exv', plainFilename)
 
    print "Tagging " + plainFilename
 
    # get the path - if available
    m = pathRe.search(filename)
    if m:
        pathname = m.group()
    else:
        pathname = ""        
 
    # backup metadata to exv-file
    p = subprocess.Popen(EXIVBINARY + " -f ex \"" + filename + "\"", shell=True)
    sts = os.waitpid(p.pid, 0)
 
    # mv "$BASENAME.exv" "$NEWMETAFILENAME"
    shutil.move(pathname + baseFilename + ".exv", pathname + newMetaFilename)
 
    # add watermark
    p = subprocess.Popen("/opt/local/bin/composite -unsharp 2.0x1.4+0.6+0.05 -dissolve 30 -gravity southeast -geometry +25+25 \"" + WATERMARKFILE + "\" \"" + filename + "\"  \"" + pathname + newFilename + "\"" , shell=True)
    sts = os.waitpid(p.pid, 0)
 
    # restore metadata
    p = subprocess.Popen(EXIVBINARY + " -f in \"" + pathname + newFilename + "\"", shell=True)
    sts = os.waitpid(p.pid, 0)
 
    # delete metadatafile
    os.remove(pathname + newMetaFilename)
 
    # open file in finder (mac only)
    p = subprocess.Popen("/usr/bin/open -a Finder \"" + pathname + "\"", shell=True)

one last cup of coffee

one last cup of coffee

Camera Model: NIKON D70
Lens: Tokina 12-24mm 1:4 DX
Focal Length: 12.00 mm
Focal Length (35mm Equiv): 18 mm
Exposure Time: 1/25 sec
F-Number: f/4
Shooting mode: Aperture priority
Exposure bias: -2/3 EV
Flash: No
ISO: 200
Image at flickr, large version

untitled

untitled

Camera Model: NIKON D70
Lens: Tokina 12-24mm 1:4 DX
Focal Length: 12.00 mm
Focal Length (35mm Equiv): 18 mm
Exposure Time: 1/500 sec
F-Number: f/11
Shooting mode: Program Automatic
Exposure bias: -2/3 EV
Flash: No
ISO: 200
Image at flickr, large version

Gothic library

Gothic library

Camera Model: NIKON D70
Lens: Tokina 12-24mm 1:4 DX
Focal Length: 12.00 mm
Focal Length (35mm Equiv): 18 mm
Exposure Time: multiple exposures
F-Number: f/13
Shooting mode: Program Automatic
Exposure bias: 0 EV
Flash: No
ISO: 200
Image at flickr, large version

Don’t hang behind

Dont hang behind

When I did a lot of shots – looking through the viewfinder all the time – the first look back on the real world is very blurred sometimes.

Camera Model: NIKON D70
Lens: Nikon Nikkor 50mm 1:1.8
Focal Length: 50.00 mm
Focal Length (35mm Equiv): 75 mm
Exposure Time: 1/60 sec
F-Number: f/4
Shooting mode: Aperture priority
Exposure bias: -1/3 EV
Flash: No
ISO: 200
Image at flickr, large version

1901

1901

Camera Model: NIKON D70
Lens: Nikon Nikkor 50mm 1:1.8
Focal Length: 50.00 mm
Focal Length (35mm Equiv): 75 mm
Exposure Time: 1/100 sec
F-Number: f/2,8
Shooting mode: Aperture priority
Exposure bias: -1/3 EV
Flash: No
ISO: 200
Image at flickr, large version

Rear view

Rear view

Camera Model: NIKON D70
Lens: Nikon Nikkor 18-70mm 1:3.5-4.5G ED DX
Focal Length: 18.00 mm
Focal Length (35mm Equiv): 27 mm
Exposure Time: 1/320 sec
F-Number: f/8
Shooting mode: Aperture priority
Exposure bias: -2/3 EV
Flash: No
ISO: 200
Image at flickr, large version

Sunday afternoon walk

Sunday afternoon walk

Camera Model: NIKON D70
Lens: Tokina 12-24mm 1:4 DX
Focal Length: 12.00 mm
Focal Length (35mm Equiv): 18 mm
Exposure Time: 1/400 sec
F-Number: f/10
Shooting mode: Program Automatic
Exposure bias: -2/3 EV
Flash: No
ISO: 200
Image at flickr, large version

Thieves

Thieves

lots of ducks...

Camera Model: NIKON D70
Lens: Nikon AF-S VR 70-200mm/2.8G IF-ED
Focal Length: 70 mm
Focal Length (35mm Equiv): 105 mm
Exposure Time: 1/160
F-Number: f/6.3
Shooting mode: Program automatic
Exposure bias: 0 EV
Flash: No
ISO: 200
Image at flickr, large version

Grimmenthal railway station

Grimmenthal

I was in a hurry and used the handrail instead of the tripod…

Camera Model: NIKON D70
Lens: Tokina 12-24mm 1:4 DX
Focal Length: 12.00 mm
Focal Length (35mm Equiv): 18 mm
Exposure Time: multiple exposures
F-Number: f/4
Shooting mode: Program Automatic
Exposure bias: 0 EV
Flash: No
ISO: 200
Image at flickr, large version

Erfurter Dom (2)

Erfurter Dom

See Wikipedia: english, german.

Camera Model: NIKON D70
Lens: Tokina 12-24mm 1:4 DX
Focal Length: 12.00 mm
Focal Length (35mm Equiv): 18 mm
Exposure Time: multiple exposures
F-Number: f/4
Shooting mode: Program Automatic
Exposure bias: 0 EV
Flash: No
ISO: 200
Image at flickr, large version

Charlotte 27: Mailboxes

Charlotte 27: mailboxes

Charlotte 27: Rest in peace Charlotte 27: Liebe Charlotte 27: Backyard Charlotte 27: graffiti Charlotte 27: staircase Charlotte 27: ksr

I’m living in the backyard of this building for nearly nine years now. It is decayed and somehow romantic. I love to come home through this hall full of graffiti.
The building is sold now, all residents left. In a year or so, it will be just another of this renovated buildings without a soul and rentals nobody can afford…

Camera Model: NIKON D70
Lens: Nikon AF-S VR 70-200mm/2.8G IF-ED
Focal Length: 120 mm
Focal Length (35mm Equiv): 180 mm
Exposure Time: 1/25
F-Number: f/2.8
Shooting mode: Aperture priority
Exposure bias: -1/3 EV
Flash: No
ISO: 200
Image at flickr, large version

Happy New Year

20090101_happy_new_year

Camera Model: NIKON D70
Lens: Nikon Nikkor 18-70mm 1:3.5-4.5G ED DX
Focal Length: 62.00 mm
Focal Length (35mm Equiv): 93 mm
Exposure Time: 10 sec
F-Number: f/22
Shooting mode: Manual
Exposure bias: 0 EV
Flash: No
ISO: 400
Image at flickr, large version

Klaus Hugler

Klaus Hugler

Another shot of Klaus Hugler.

Camera Model: NIKON D70
Lens: Nikon Nikkor 18-70mm 1:3.5-4.5G ED DX
Focal Length: 27.00 mm
Focal Length (35mm Equiv): 41 mm
Exposure Time: 1/125 sec
F-Number: f/8
Shooting mode: Manual
Exposure bias: 0 EV
Flash: Yes (Octabox camera left, another flash unit for the background)
ISO: 200
Image at flickr, large version

Tolstoi is telling a joke

This is Klaus Hugler. He’s not only a Tolstoi look-alike, but also an author, teacher and philosopher. He has a lot of interesting stuff to tell – not only jokes 🙂

(sorry for the silence in my photstream, at the moment, there are a lot of activites in my real life…)

Camera Model: NIKON D70
Lens: Tokina 12-24mm 1:4 DX
Focal Length: 12.00 mm
Focal Length (35mm Equiv): 18 mm
Exposure Time: 1/125 sec
F-Number: f/11
Shooting mode: Manual
Exposure bias: 0 EV
Flash: Yes (Octabox camera left, diy-sunbounce camera right)
ISO: 200
Image at flickr, large version

Happy Birthday!

Camera Model: NIKON D70
Lens: Nikon AF-S VR 70-200mm/2.8G IF-ED
Focal Length: 78 mm
Focal Length (35mm Equiv): 156 mm
Exposure Time: 1/400
F-Number: f/2.8
Shooting mode: Program automatic
Exposure bias: -2/3 EV
Flash: Yes
ISO: 200
Image at flickr, large version