2007-04-17

Set EXIF data for Motorola Razr and other camera phones

Picture of a Motorola Razr v3t

The Motorola Razr v3t has what turns out to be a very nice 1 megapixel camera (see recent photos taken with mine). This is the 3rd camera phone that I've owned. My Nokia 6600 had a mediocre 640x480 camera (examples). Next my T-Mobile MDA offered more resolution (1mp) but the quality was still quite poor (examples).

However, none of these phones produce any useful EXIF metadata. At least the Nokia 6600 stored the date/time in comments section of the EXIF metadata. While not immediately useable, it was once I wrote a script to extract it and properly write it into the EXIF "CreateDate" field.

The Razr doesn't store the date/time anywhere in the photo itself. However, it does have an option to use the date/time as the file name. So I've written a perl script to parse that date/time out of the file name and and write it into the "CreateDate" EXIF metadata field.

The script also sets a bunch of other EXIF data, such as the make and model of the phone, your name and copyright, name of software used to manage the photos, etc. And you can still use it if you don't have a Razr. It only updates the date/time if it notices that the file name is in the right format. Otherwise it still sets all of the the other stuff.

Here's an example:

Screen shot of an example of running the command

In particular, I like that it also sets the EXIF "MODEL" tag so that Flickr can correctly identify the camera (as well as the date/time) from photos taken with your camera phone, which it cannot without the proper EXIF data.
Screenshot of Camera model info on Flickr
You can download "

" (as a ZIP archive) from my Scripts downloads page.

You'll need perl and also the command line program called exiftool.

If you're unlucky enough to need to run this under Windows, you will also need to get a Korn Shell. I recommend downloading the UWIN toolset from AT&T Research. It installs a complete UNIX-like command line environment under Windows and is a great baseline for a bunch of other open source stuff.

Note: The Motorola Razr V3t is a T-Mobile specific model (hence the t in V3). I haven't tried this with any other Razr V3 models.

0 comments: