FAQ:Pictures and Multimedia

From PGVWiki
Jump to: navigation, search

Questions about Pictures and Multimedia

How do multimedia items in Gedcom work?

The GEDCOM 5.5 specification allows for built-in support of multimedia objects through the OBJE tag. PhpGedView looks for this tag in the Gedcom when search for multimedia items. An example of GEDCOM code that links a picture to a person, looks like this:

1 OBJE
2 TITL A title for this picture
2 FILE C:\Documents and Settings\USER\My Documents\My Pictures\Genealogy\GrandpaJones.jpg
2 FORM JPG
2 _PRIM Y

This snippet of Gedcom code says that the GrandpaJones.jpg file is associated with this person and for this person it has the TITL "A title for this picture". The FILE tag is the only required piece and tells where the file was located when it was originally attached to the person. The _PRIM tag is often added by genealogy programs to signify that this picture is the PRIMary picture, or the picture that should be used for charts.

Obviously the original file path "C:\Documents ...\GrandpaJones.jpg" is no longer valid on the internet. PhpGedView assumes that all media files are in the "media" directory and so by default it would look for this picture as "media/GrandpaJones.jpg". It would also look for a thumbnail at the "media/thumbs/GrandpaJones.jpg" path. PhpGedView makes this conversion according to the "Media Directory" and "Media directory levels to keep" Gedcom Configuration settings.

With the "directory levels" setting, you can tell PGV to look for this picture at "media/Genealogy/GrandpaJones.jpg" or at "media/My_Pictures/Genealogy/GrandpaJones.jpg". This allows you to organize your pictures and can help prevent file name collisions.

Here is an example using a "directory levels" setting of 1:

For the following gedcom records:

1 OBJE
2 FORM jpg
2 FILE H:\PGV\media\Family1\image0001.jpg
2 TITL Title of family 1 pic 1
2 NOTE Note of family 1 pic 1
2 _SCBK Y
2 _PRIM N
2 _TYPE PHOTO
2 _SSHOW Y

Another INDI has following object record:

1 OBJE
2 FORM jpg
2 FILE H:\PGV\media\Family2\image0001.jpg
2 TITL Title of family 2 pic 1
2 NOTE Note of family 2 pic 1
2 _SCBK Y
2 _PRIM N
2 _TYPE PHOTO
2 _SSHOW Y

You would use the following file paths:
/media/family1/image0001.jpg (main image)
/media/thumbs/family1/image0001.jpg (thumbnail)
/media/family2/image0001.jpg (main image)
/media/thumbs/family2/image0001.jpg (thumbnail)

Why are image links lost after updating a Gedcom file?

The most likely cause for this problem is with the way your genealogy application exports the image links in the Gedcom file. Some genealogy applications, such as Family Tree Maker, do not export the multimedia links in the gedcom file at all. For these types of Gedcom files, phpGedView includes the "Add Media Tool" which will allow you to keep image links in a separate database table and add them to the Gedcom before it is imported.

Other programs, such as Family Historian, use custom links so that the image names are not the same with every export. There is a program available that will help you to convert these types of Gedcoms. It can be downloaded from here: http://www.fhug.org.uk/cgi-bin/index.cgi?action=downloadinfo&cat=GedCom&id=3

Why are image links lost after downloading a Gedcom file?

By default PhpGEDview keeps the images in a folder named "media". When your GEDCOM is exported, the images still point to the "media" directory of PhpGEDview. When you import your GEDCOM into your genealogy application, the "media" folder will most likely not be on your computer and the link to the images will be lost. Depending on your genealogy application you may be able to import the images by changing your GEDCOM file before importing the GEDCOM. Use a word processor or some other program that allows changing of text documents. Search for the lines that start with "0 @M#@ where # is a number. There should be lines directly below the previous lines that starts with "1 FILE media\" Change the "media" folder name to the folder of your images. The GEDCOM will then have links to your images, and your genealogy application should be able to link the images.

My photos and other media files are not showing up. What do I do?

First read the Media section of this Website and the MultiMedia Objects section of the readme.txt for more information about multi-media files and the media directory. Use the following steps to get phpGedView to recognize your media files:

  • First collect all of the media files referenced in your GEDCOM file and place them in a new directory. This can be the hard part depending on how your genealogy software operates.
  • Next create thumbnails for each of them in a separate directory with the same file names.
  • Upload the main media files to the media directory or, if you changed the location of the media directory in the phpGedView online configuration, to the directory you've chosen.
  • Upload your thumbnails to the media/thumbs directory

Error on image upload: Allowed memory size...

Try increasing the value of $PGV_MEMORY_LIMIT in the file config.php (in the phpgedview root directory). The default is 32M; you might try 64M.

How do I separate my media for multiple GEDCOMs on my site

If you do not want media shared with all your GEDCOMs, you can create separate directories for each GEDCOM. Edit the configuration file for each GEDCOM by changing the MultiMedia directory of the Multimedia section.