Metadata Write-back

Reading and writing of metadata is mostly done fully automatically by IMatch. Using the ExifTool metadata library in cooperation with the IMatch database system makes reading and writing metadata a safe and reliable process. But Metadata can be a complex topic. And especially when you have to deal with metadata in different file formats or written by different applications, you may need to dive a bit deeper into these topics to avoid problems and pitfalls.

Reading Metadata

When IMatch indexes images and other files it also imports the embedded metadata into the database.

This step is important because it allows IMatch to access the metadata efficiently later, without requiring access to the original file. IMatch uses an internal, highly optimized representation of the metadata, which is ideal for editing, searching, sorting and other tasks. When IMatch imports metadata, it skips data not useful for humans and binary data blocks that would clog up the database (e.g., binary data of some EXIF maker notes).

You can control how IMatch imports metadata and if and how it produces metadata during import via the Metadata and Metadata 2 options.

Once the metadata has been imported, you can view and edit it in the Metadata Panel and the Keyword Panel. Wherever IMatch displays metadata, it uses the cached data in the database and does not load it again from the original file.

Producing 'Rich' XMP Metadata from IPTC, EXIF and GPS Metadata

When IMatch imports metadata, IMatch by default applies the rules of the Metadata Working Group in order to produce rich XMP metadata from existing IPTC, EXIF and GPS metadata in the file. This process involves mapping information stored in certain IPTC, EXIF and GPS metadata tags into the corresponding tags of the XMP record IMatch maintains for the file. If a file has no IPTC, EXIF or GPS data, IMatch produces a standard XMP record and fills it with basic metadata produced from the file itself.

XMP is the newer metadata format and is the preferred way of storing metadata today. XMP can be embedded into a variety of file formats, and is stored in so-called XMP sidecar files otherwise. IMatch by default prefers XMP metadata over the older metadata formats IPTC.

 

Most commands, the Metadata and Keyword panel etc. work only with XMP metadata because it is the most flexible metadata storage format. It combines both the classic IIM IPTC with EXIF and GPS data.

IMatch re-imports IPTC, EXIF and GPS data into XMP whenever a file is added to the database, rescanned or re-read, e.g. after writing back metadata. This ensures that the XMP record is always synchronized with the IPTC, EXIF and GPS data in the file.

Writing Metadata

When IMatch writes changed metadata back into files, it gets the modified fields for each file from the database and then uses ExifTool to update the data in the file on disk. This ensures that only a minimum of data is written and that existing metadata in the files remains as stable as possible - avoiding potential problems caused by manipulating proprietary data contained in some file formats.

Native data like classic IPTC or EXIF is always embedded into the image file itself. XMP metadata can be embedded, or stored in XMP sidecar files. After writing metadata to a file, IMatch re-imports the metadata back into the database. This ensures that secondary metadata produced by writing certain tags is synchronized with the database, and metadata is properly mapped from IPTC, EXIF and GPS into XMP.

IMatch is very flexible when it comes to XMP metadata storage schemes. You can control the corresponding options via Edit > Preferences > Metadata 2.

The Pen Icon

Files with pending metadata show a Pen Icon in the file window:

Files with unwritten (pending) metadata.
The tooltip of the pen shows which metadata tags need to be written.

Writing Back Selected Pending Files

Click the pen icon in the File Window panel to write-back all selected files. The keyboard shortcut is Ctrl+Alt+S

Writing Back All Pending Files

To write-back all files in the entire database, use Shift+Alt+S. IMatch displays a confirmation dialog.

The Pending Write-back Collection shows all files with unwritten metadata in the database.

Both commands are also available under Commands menu > Write-back

Metadata Migration between Different Metadata Formats

At the time metadata is written, IMatch optionally migrates (copies) metadata values from the XMP record to classic (IIM) IPTC data and EXIF data. This ensures compliance with the Metadata Working Group (MWG) guidelines and also makes XMP contents available for non-XMP aware applications where possible.

Unless you have good reasons not to, you should enable the MWG compliance mode in IMatch and let it automatically synchronize data between the different metadata standards.

During this process IMatch updates each IPTC, EXIF and GPS tag in the file from the corresponding XMP tag, if the XMP tag was changed. IPTC, EXIF and GPS data is written directly to the file, while XMP metadata is either embedded or stored to a separate sidecar .XMP file.

This process ensures that classic IPTC, EXIF, GPS and XMP metadata stay synchronized. This is very important.

When IMatch updates IPTC, EXIF and GPS Data

The Metadata Working Group recommends that an application should only create classic (IIM) IPTC/EXIF/GPS data when the user explicitly demands it. By default, newer applications should only use the more modern XMP metadata format. EXIF data is usually only created by digital cameras. GPS devices or applications may add a classic GPS record to a file as part of the EXIF record, or, if newer, as part of the XMP record. As said above, IMatch automatically imports existing IPTC, EXIF and GPS data into the XMP record it maintains for each file.

You usually update only XMP metadata in the IMatch user interface (Metadata Panel, Keyword Panel). IMatch stores your changes to the database and at some later point updates the XMP record in the image file or sidecar file with these changes. At the time metadata is written back, IMatch also updates existing IPTC, EXIF and GPS data in the file from change made to XMP.

It does not, by default, create IPTC or EXIF metadata in files. If you need to support software, clients or services which cannot handle XMP metadata and require classic IPTC metadata, you can enable IPTC creation under Edit > Preferences > Metadata 2: File Formats on a per file format basis. If you enable this for a file, IMatch not only updates existing IPTC and EXIF data, but also creates it when needed.

This behavior is of especial importance when you work with RAW files. If you update XMP metadata for a RAW file, this XMP data is usually stored in a sidecar file. The RAW file is not modified when you edit metadata. Only when the RAW file already contains IPTC and EXIF data, this data is updated by IMatch. But IMatch does not create new IPTC records in RAW files.

Metadata Propagation

When the data for a version master is written and you have enabled metadata propagation in the associated relation definition, IMatch will propagate the changed metadata automatically to all accessible (on-line and writable) versions.