Tuesday, 12 July 2011

How-to: Digital Watermarks Part One Darkness Visible

You know watermarks; they are the authentication marks that appear on bank notes, branded stationary, company documents and education certificates. Those are the visible watermarks we see everyday. Hold up a bank-note to the light and there it is, molded and imprinted into the paper.

You will also see watermarks on reproductions of photographs and other artworks, a visible assertion of copyright, usually the copyright-holder’s name and logo. This adds a third utility to the watermark: a sign of authenticity to combat fraudulent use and unauthorized copying, an assertion of rights by the rights-holder and a permanent branding or advertising…

Digital watermarking is the extension of this utility into the digital world. It is easy to reproduce and distribute identical copies of digital information, be it images, text or audio. There is no shortage of data bits, as the entertainment industry has discovered – or anyone who shares images from their digital camera. You might think fraudulent use of digital photos is somebody else’s problem. Leaving aside the large travel companies I’ve worked for, which have large and expensive image libraries, I know several freelance photographers for whom it’s a real concern. Put an image gallery up on the web and it will likely be indexed by the search engines, where less than scrupulous people can find it and ‘rip’ it for free, passing it off as their own and maybe making money off your work.

The answer is to watermark your digital images. There are two ways to do this; visible and invisible. We’ll look at invisible watermarking in part two.

For all digital photos, you can put an invisible copyright in the Exif/IPTC fields of the image file. Most digital cameras can be set up to insert a copyright statement automatically. The trouble is there are lots of free image-editing utilities you can use to take it out in one click.

Visible watermarks work well enough as they are permanently ‘in your face.’ A watermark placed in the center of the image will remain even if someone crops the photo and it’s really difficult to erase, but a watermark bang in the middle makes it hard to enjoy looking at the photo. You could try placing the watermark around the edges, but this is easily defeated by cropping the photo. The size and placement of watermarks is the compromise you have to make using your own judgment. To paraphrase a marketing quote, “the size of the logo should be proportional to your ego and the picture’s value; and inversely proportional to the quality and interest of the picture.”

Onto a practical example using the image editing application The GIMP, the GNU Image Manipulation Program. I’m no artist and there’s usually a dozen ways to get the same result in the GIMP; these are mine.
  • Open your photographic masterpiece and immediately Save As… or Save A Copy so you don’t mess up the original and can keep additional layers. You will need the Layers palette so press ctrl – ‘l’ to open it if it is not already visible.
  • Create a text layer for your copyright assertion using a clean, legible font in a contrasting color appropriate to the portion of the image over which it’s placed.
  • Watermarks are typically colored along the grayscale between black and white. Any other text color will require you to use the Value mode in your Layers dialog.
  • Choose your text foreground color first, then select the Text Tool icon, it’s the full black ‘A’ in the Toolbox. Alternatively press the ‘t’ key.
  • Type your text.
  • You can use the Character Map application to find and include the Copyright mark ©.
  • Size and position it within your image.
    ( I’ll also select Image, Image to Layer Size to make the text layer the same dimensions as my photo for later on)
  • If you want to make your watermark more robust, you could use Layer, Transform, Arbitrary Rotation, Angle -45, to place your watermark diagonally, which defeats removal by edge-cropping.
    (If you then decide to edit the copyright text it reverts to plain horizontal positioning, however)
Plain text is overly intrusive and doesn’t look like a watermark, so select your text layer…
  • You could just change the opacity of the text to a semi-transparent state, changing it down to between 10% and 30%, which is visible but not intrusive, or…
  • Change the layer mode to Overlay which achieves a similar result in one click.
This is still quite intrusive. What we want is something more subtle. Let’s try this:
  • In the text layer, select the text; Select, By color
  • Delete the text to leave the text outline as a selection. Now to try some filters…
  • Filters, Map, Bump Map. The previews doesn’t show much, but hit OK and what you get is a subtle text outline of your copyright statement floated over your image.
  • We can make something a little stronger than this. Undo the Bump Map filter, we’ll go again.
  • Add a new layer below your text layer, filled with 50% gray (127,127,127) and then Layers, Merge Down your text layer.
  • Select the text; Select, By Color. Now you have the selection, you can delete the text to leave its outline.
  • Apply Filter, Decor, Bevel to the selection
  • Now select the gray background and delete it. This gives you a beveled watermark. You could achieve something similar with the Emboss filter.
When you’re happy with your watermarked version, go to the File menu and choose Save As. If you  save the image as a .peg or .png file for use on the web, the GIMP throws a dialog telling you those formats can’t handle layers and you need to flatten the layers. This isn’t your master copy, so that’s okay… right?

This is fine for small galleries of images. You can always paste your finished copyright layer into each image in the set. For larger numbers of images, where you probably need to resize them en route, a scripted solution or automated tool such as ImageMagick is probably the way to go. RC