Indexed GEDCOM Method
Instructions for Adding Photographs
This file summarizes the procedure for adding photographs to your IGM based genealogical database. Photographs which you add will probably be in the form of either GIF or JPG files.
The Indexed GEDCOM Method (IGM) links picture files like GIFs and JPGs into a GEDCOM file by defining a new GEDCOM tag. A tag is a four-letter identifier used within a GEDCOM file to denote an instance of a particular type of information. Common tags in a GEDCOM file are
An important characteristic of GEDCOM tags is that programs which read and interpret them do not have to understand all of them. If a program comes across a GEDCOM tag it doesn't understand, it is supposed to ignore it. Therefore, we can invent a tag of our own to denote the links to picture files, and it should not interfere with any other interpretation of the GEDCOM file.
We will define a tag called PHOT which will introduce the links to
graphics files. To illustrate how this tag is used, a small section of a
GEDCOM file, with the new tag included, is reproduced below.
0 @I011@ INDI
1 NAME Ellen Louise /Gordon/
1 PHOT EllenLouiseGordon1.jpg
1 PHOT EllenLouiseGordon2.jpg
1 SEX F
2 DATE 1 SEP 1841
2 PLAC Rushford, NY
2 DATE 14 NOV 1919
2 PLAC Madison County, MT
1 FAMS @F006@
1 FAMC @F011@
The number which is the first item in each line here is an indicator of the level of nesting of the tags. You can see that we have added the new tags right after the individual's name tag. Several things should be noted here.
Although the above convention can easily be used to link pictures into your database, it would still be pretty laborious in practice if you had to manually edit the tags into the GEDCOM each time you generated a revised GEDCOM file. Therefore the IGM set of files contains a PC program called addphotos.exe, which allows you to automate the procedure.
In order to use the addphotos program, you need to compile and maintain an
index file which connects the individuals in the GEDCOM file to the pictures
which relate to them. The name of this file should have the same root as
your GEDCOM file, and should have the three-letter extension .pdx.
For instance, if the name of your GEDCOM is Macdonald.ged, the index file
should be named Macdonald.pdx.
This file is just an ASCII text file, and can easily
be created with a text editor such as the DOS Editor or Notepad.
Below is an example of a section of such a file.
Each line of the file consists of two entries. The first is the individual tag of the person of interest. This goes with the INDI tag in the GEDCOM file, and serves as a unique identifier of this person throughout the file. The tag here should include the "I", but not the "@"s which surround it in the GEDCOM file. The second item on the line is the name of the file. Note that, as above, two pictures are included for Ellen Louise Gordon.
Once you have created the index file, you can create the modified GEDCOM file
containing the PHOT tags by giving the command
at the DOS prompt. Note that since this is being done as part of the final preparation for upload of the GEDCOM file, and since it does make changes to the GEDCOM file itself, it is strongly suggested that you make a copy of the GEDCOM in a special pre-upload directory and perform these steps on that copy.
This method might seem unnecessarily cumbersome, especially if you are not used to editing text files, but it really should be rather straightforward. Unless you have a very large number of pictures, the size of the index will be fairly small. In addition, when a GEDCOM is updated and regenerated, the INDI tags do not change in general, so you will not have to change the index when the GEDCOM is updated, only when you add new pictures.
The pictures in your genealogical database may have a variety of sizes and shapes. The igmget.cgi script which generates the data page for an individual is set up to show any pictures tied to that individual at the top of the generated HTML page. In order to keep the page format consistent, igmget.cgi shows all pictures, regardless of their true size, with a height of 200 pixels and a width such that the picture has the correct aspect ratio. The full-size picture may be seen by clicking on the (possibly) reduced picture at the top of the individual's data page.
This situation may lead to wasted download time, particularly for large pictures, due to the fact that your browser must download the full picture, even though it is only going to display a reduced, lower-resolution version of it. This inefficiency is particularly acute when a large number of pictures is being downloaded, as when displaying a pedigree or descendant tree. Especially for large pictures, it makes sense to maintain two versions of the picture: the full-size one, and a smaller, or thumbnail, version which may be downloaded quickly for the smaller display.
The IGM program suite is set up to accommodate this situation. In the above example, suppose that the picture EllenLouiseGordon2.jpg is a very large file. Using any of a variety of graphics programs (e.g. Paint Shop Pro from JASC Software, you can create a smaller, lower-resolution version of the picture. Ideally, this picture will have a height of 200 pixels and a width such as to match the original picture's aspect ratio, but the thumbnail can actually be made smaller to reduce download time. The thumbnail picture should be given the same name as the original picture, except with the suffix "_thumb" after the main part of the name. For the above example, the name of the thumbnail would be EllenLouiseGordon2_thumb.jpg. The IGM programs which display reduced-size versions of pictures, such as igmget.cgi, igmpedtree.cgi, and igmdesctree.cgi, will always preferentially display a picture with the suffix "_thumb", if it exists. But if the user clicks on the thumbnail image, the full size picture will be downloaded and displayed on its own page. Note that the photo index (.pdx) file does not need to reference the thumbnail file; it still just references the file EllenLouiseGordon2.jpg. Thus, thumbnails can be uploaded and used without the necessity of regenerating the modified GEDCOM file. Both the full-size picture and the thumbnail picture must be located in the main photos directory.
A few hints are in order for dealing with pictures. First, pictures can take up a lot of space. They are generally not worth just a thousand words, but a few tens or hundreds of thousands of words, of computer memory. It is easy to fill up even tens of megabytes of server space with just pictures. But a few guidlines can help here.
Doug Macdonald <DAMacdonald@juno.com>