Image metadata processing June 29, 2013 / Updated: June 28, 2023
Whenever a new image is discovered Zenphoto attempts to populate certain object properties from the metadata associated with the image. Images may contain both EXIF, IPTC or XMP metadata or may be accompanied by a XMP sidecar file (see xmpMetadata extension).
Zenphoto uses the formal specifications for these metadata to determine which object properties are set:
NOTE: populating Zenphoto object properties is in addition to storing the EXIF and IPTC fields in the object. It is a service to try to populate commonly used properties from the image data.
Often multiple metadata fields will map onto a single property. In this case Zenphoto applies a precedence order to the metadata, using the highest precedence field discovered. This may cause unfortunate effects when cameras or image processing software has used these fields for their own purpose. It is always possible to disable Zenphoto from using such fields.
One other source of confusion is the unfortunate naming of the EXIF "title" field. According to the EXIF specification this is the "image description". Zenphoto honors the definition of the field.
NOTE: Should you get unexpected metadata results, especially with non-ASCII characters (Cyrillic for example), try again with the xmpMetadata extension enabled.
The following is the precedence processing order for mapping metadata to Zenphoto properties:
- IPTC Date Created+IPTC Time Created
- EXIF Date Time
- EXIF Date Time Original
- EXIF Date Time Digitized
- the image filemtime
- IPTC Object Name
- IPTC Image Headline
- the image filename with the suffix stripped off
- IPTC Image Caption
- IPTC SubLocation
- IPTC City
- IPTC State
- IPTC Location Name
- IPTC ByLine
- IPTC ImageCredit
- IPTC Source
- IPTC Copyright
This text by www.zenphoto.org is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Code examples are released under the GPL v2 or later license