Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.

How to install Perl, ExifTool and gpsPhoto in a MS Windows XP environment

last update: August, 15h., 2008

This installation summary shall help the novice user to install and enable the proper functioning of the two great pieces of software in a MS Windows XP environment.
Sequentially following the procedures outlined below will enable you to run Exiftool and gpsPhoto from any folder you are currently positioned.
(Existing Perl users might prefer a different Perl environment.)
Please also consult the authors WEB-pages for additional instructions and information.

Acknowledgements to the author of ExifTool, Phil Harvey, to the Authors of gpsPhoto, Andreas Neumann, Peter Sykora and Uwe Girlich maintaining the gpsPhoto-Project on Source Forge.

Perl - from Active State

(note: the Perl Syntax for the double colon '::' refers to hyphen '-' in MS Windows)

Get the latest Acitve Perl version (currently 5.10.0.1003) for Windows (x86 or x64) as MSI-Package from here:
http://www.activestate.com/Products/activeperl
and run the downloaded MSI-Package.

ExifTool

ExifTool can be obtained in 2 ways (a or b, c)
and installed in 3 ways:

a: This option installs an ExifTool Package from Active State (may not be the latest version). To do so, start the Perl Package Manager from the Windows Menu.
A Command Window opens displaying the ppm-prompt 'ppm>'. Type:install exif-tool

b: (my preferred option) get the latest ExifTool Version from the developers/project WEB-Page:
http://www.sno.phy.queensu.ca/~phil/exiftool/

Once downloaded, extract the package for ExifTool. To find the latest information for the current release open the README-file (no extension) in your Internet Explorer.

Important: MS Windows users in addition need to download NMAKE15.EXE, unpack it and place the files into C:/Windows/System32.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084

Before proceeding make sure that the additional path variable 'C:\Perl\bin\; has become part of your system path statement.
Either you set the additional path variable manually 'C:\Perl\bin\; or you can simply restart the Computer.
Actually the best option is to restart your machine before proceeding to the next step

To upgrade ExifTool only start here:

To build a Perl package for ExifTool do the follwing:
Open a CMD-Window and change to the folder where you have the extracted version of ExifTool
eg: c:\...\...\Downloads\Image-ExifTool>

Makefile.pl        (this creates file 'Makefile' unsed by 'nmake')
nmake             (this prepares the ExifTool Module to beinstalled in your Perl invironment)
nmake install       (this installs the ExifTool Module into your Perl invironment)

c: This option allows to run ExifTool as a Windows Executable

Please refer to the installation instructions on the developers page.

The knowledgebase for ExifTool may provide answers to a specific problem that someone had asked before:
http://www.cpanforum.com/dist/Image-ExifTool

The on-line documentation for ExifTool provides a great number of examples. Following just one more I am using a lot.

Example: In order to rename files in a given folder with this format: Year-Month-Day_Hour-Minute-Second.jpg use the following command:

exiftool "-FileName<${CreateDate}.jpg" -d %Y-%m-%d_%H-%M-%S.jpg

gpsPhoto

Up-to-date details can be found at the developers/project WEB-Page itself:

http://www.carto.net/projects/photoTools/gpsPhoto/ From there you should download the latest release of gpsPhoto.pl

Copy 'gpsPhoto.pl' into a folder that is also in the path variable of your system. Normally 'c:\windows' is sufficient and allows to run 'gpsPhoto.pl' from anywhere.

There used to be a Windows executable (.exe) available, but not for the latest revisions.
You may contact Andreas Neumann or Uwe Girlich who maintains gpsPhoto on Source Forge and provide a donation for their great work.

Early versions gpsPhoto required additional modules like 'math-round', 'datemanip' and 'XML-TreeBuilder' for the Perl installation as discussed here.
It seems that in Active Perl Version 5.10.0 these steps may not be necessary anymore. But I have not verified this personally, so I leave the information in this documentation for now.

Important note: gpsPhoto v.1.148 no longer requires the three modules mentioned. Hence you may skip the installtion procedure for the three modules listed below.

To install these additional Pearl Packages for gpsPhoto to run properly do the following:
Start the Perl Package Manager (PPM) from the Windows Menu.
A Command Window opens displaying the PPM-Prompt' ppm>

Type: install math-round
Effect: the package will be downloaded and installed

Type: install datemanip
Effect: the package will be downloaded and installed

Type: install XML-TreeBuilder
Effect: the package and the HTML-Element package will be downloaded and installed

Type: query *
Effect: the PERL Package Manager displays all installed modules

Type: search followed by a term eg. exif
Effect: the PERL Package Manager displays available or installed modules for that term.

When you run gpsPhoto.pl now, there is a great possibility that gpsPhoto will produce the following error:

To correct this problem for your environment you need to download the Math-Complex-1.37 Module and then to install it.
The installation will inform you that there is a conflicting Math-Complex Module and the solution is provided (see below).

To build a Perl package for Math-Complex do the follwing:
Open a CMD-Window and change to the folder where you have the extracted version of Math-Complex
eg: c:\...\...\Downloads\Math-Complex-1.37>

Makefile.pl        (this creates file 'Makefile' unsed by 'nmake')
nmake             (this prepares the Math-Complex Module to beinstalled in your Perl invironment)
nmake install       (this installs the Math-Complex Module into your Perl invironment)

Perl from Active State installs a different version of the Math/Complex and Math/Trig Modules than required by gpsPhoto.
Hence nmake install will produce the following message:

Do as the message suggests and type nmake install UNINST=1
(remember 'make' has become 'nmake' for our Windows Installation).

As a result gpsPhoto.pl will no longer produce this error.

Earlier versions of gpsPhoto required some changes to 'gpsPhoto.pl' to process TIF files.
The current version does not require this change anymore.

To make gpsPhoto process your TIF files edit the gpsPhoto.pl and insert/add the following at line 191 (as of August 2006):
$ext eq ".TIF" || $ext eq ".tif" ||
Note: The "||" implies the function 'or', so don't add another "||" after the last extension at the end of the line.

Using gpsPhoto

Before you apply certain statements to your productive image data one should use a subset of images to be certain that your commmand composition acts according to your intention.

For the sample below, I have created a folder named 'try' and two subfolders named 'images' (that's where the images are) and 'gps' (that's where the corresponding GPX file is).
Also I have created a list named 'list.txt' that contains the filenames only (the command: dir /b > list.txt creates that list).

Open the Windows Command-Prompt Window, change to the folder where your images are located (according to the entries in your 'list.txt') and then type the following sample statement:

gpsphoto.pl -I c:\try\images\list.txt --gpsfile c:\try\gps\20061008.gpx --timeoffset 0 --maxtimediff 150 --copyright "by-nc-sa" --keywords "Truck, Nevada" --credit "Hans Loepfe, HALO-Photographs" --copydate

Explanation of the Options and Paramters used:

A listing of Options is displayed by typing gpsPhoto.pl without parameters.
A very useful parameter is --dry-run . It prevents gpsPhoto from executing.
The on-line listing with a detailed explanation for all options gpsPhoto provides can be found on the project page at SourceForge:
Syntax and options for gpsPhoto.pl
This site features another simple example for geo-tagging some images in batch-mode.

----------------------------------------

If anything goes wrong, check first that the term 'C:\Perl\bin\; has been applied to your path setting.
To check, open a CMD-Window and type set. At the statement 'Path=' you should find C:\Perl\bin\; among other statements.
If you don't find it, restart your machine and check the same again.
After a restart it should be here now, if still not, then go back to the drawing board (meaning something went wrong).
While I was writing this installation I found that it often helped to shut down the machine, take a coffee break and start it up again. A warm start normally did not help. It seems as if there is a memory management problem in the air.

----------------------------------------

This installation procedure has recently been verified for an installation on a machine without any Perl installed. It worked out just fine for me.
This document was created by Hans Loepfe, HALO-Photographs.com, August 18th. 2006 (updated September 26th, 2007 / November 30th., 2007 / August 15th., 2008))

In case you would like to contact me please use this Contact form: Contact & Anfragen

Creative Commons License This document titeled Install Perl, ExifTool & gpsPhoto in a MS Windows XP environment created by Hans Loepfe is licensed under a Creative Commons, Attribution, Noncommercial, Share alike license. Based on works at www.halo-photographs.com.

Creative Commons PlusPermissions beyond the scope of this Creative Commons license may be available at the Image License & Purchase page.