Embed copyright notices into JPEG images

Apr 14, '04 10:04:00AM

Contributed by: macubergeek

Digital Cameras embed several types of data inside the images you take, including camera manufacturer, date the picture was taken, and aperture, shutter speed, and focal length settings. These are called EXIF tags and are also called "metadata." Here's how to take advantage of these tags to embed your own copyright notice.

  1. Download the file exiftags-0.98.tar.gz from the exiftags web page to your desktop. Stuffit should launch and decompress the file to a folder.

  2. If you haven't done so already, download and install the Apple Developer Tools. You will have to go to the Apple developer site and sign up for a free account in order to download the tools (and they're large, at over 300mb). If you purchased Panther, it should already be on one of the CDs.

  3. Launch /Applications -> Utilities -> Terminal

  4. Enter the following commands:
     $ cd Desktop
     $ cd exiftags-0.98
     $ make && sudo make install
    
Enter your password when requested on the last step. You've now compiled the exiftags and exifcom programs. Read the rest of the hint to see how to use them to embed your copyright notice...

Let's look at my picture trees.jpg's EXIF tags using exiftags:

$ exiftags trees.jpg
Camera-Specific Properties:

Equipment Make: OLYMPUS OPTICAL CO.,LTD
Camera Model: C40Z,D40Z
Camera Software: QuickTime 6.4
Maximum Lens Aperture: f/4.8

Image-Specific Properties:

Image Orientation: Top, Left-Hand
Image Orientation: Top, Left-Hand
Horizontal Resolution: 72 dpi
Vertical Resolution: 72 dpi
Image Created: 2003:12:07 15:49:06
Exposure Time: 1/500 sec
F-Number: f/5.6
Exposure Program: Creative
ISO Speed Rating: 100
Exposure Bias: 0 EV
Metering Mode: Pattern
Light Source: Unknown
Flash: No Flash
Focal Length: 19.80 mm
Color Space Information: sRGB
Image Width: 2272
Image Height: 1704
Now lets add a "Comment" with my copyright notice. Type:
$ exifcom -w "copyright Joe Blow" trees.jpg
Now let's look at the tags again to see the new "Comment" field:
$ exiftags trees.jpg
Camera-Specific Properties:

Equipment Make: OLYMPUS OPTICAL CO.,LTD
...
...
Flash: No Flash
Focal Length: 19.80 mm
Comment: copyright Joe Blow
Color Space Information: sRGB
Image Width: 2272
Image Height: 1704
You can add your copyright tag to a folder full of images by doing:
$ cd /path/to/picture/directory
$ exifcom -fw "copyright Joe Blow" *
Those handy with AppleScript can create a folder actions script using this construct:
  do shell script "exifcom -fw "copyright Joe Blow" * && exiftags *"
Then attach the script to your picture folder. Now, whenever you add an image to the folder, you automagically tag it with your copyright notice! Check out this Apple tech note ... following it's lead, I came up with an AppleScript:
on adding folder items to this_folder after receiving these_items
	do shell script "exifcom -fw 'copyright Joe Blow' *"
end adding folder items to
Your mileage may vary, of course, but this worked for me...

Comments (18)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040411141751734