<?xml version="1.0" encoding="utf-8"?>
<section id="GuideReferenceMetadata">
  <title id="titleGuideReferenceMetadata">Metadata Processing</title>
  <para>This section describes the metadata reading and writing process.</para>
  <para />
  <section id="Metadatahandling">
    <title>Metadata handling</title>
    <para />
    <section id="Readalgorithm">
      <title>Read algorithm</title>
      <orderedlist spacing="compact">
        <listitem>
          <para>Read Exif, IPTC and XMP from the file.</para>
        </listitem>
        <listitem>
          <para>
            Display this "raw" data in the
            <link linkend="GuideOtherWindowsExif">Exif Window</link>
            .
          </para>
        </listitem>
        <listitem>
          <para>Read XMP sidecar or Geeqie private metadata file. This data will override the XMP data read from the file.</para>
        </listitem>
        <listitem>
          <para>
            Synchronise XMP data with Exif and IPTC data. This process corresponds to the section "Reconciling metadata properties" as described in the
            <link linkend="GuideReferenceStandards">XMP Specification</link>
            .
            <itemizedlist spacing="compact">
              <listitem>
                <para>detect which of Exif and Xmp.exif is newer and copy the data in the appropriate direction</para>
              </listitem>
              <listitem>
                <para>detect which of IPTC and XMP is newer and copy the data in the appropriate direction</para>
              </listitem>
            </itemizedlist>
          </para>
        </listitem>
        <listitem>
          <para>
            Use this "processed" data within Geeqie, with the exception of in the
            <link linkend="GuideOtherWindowsExif">Exif Window</link>
          </para>
        </listitem>
      </orderedlist>
      <para />
    </section>
    <section id="Metadatamodification">
      <title>Metadata modification</title>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            Metadata is written to a single file or group of files as specified in the
            <link linkend="MetadataMiscellaneous">Metadata</link>
            tab of main Preferences.
          </para>
        </listitem>
        <listitem>
          <para>Modifying the keywords, comment, orientation, etc. does not ask for confirmation, but immediately modifies the metadata in memory and adds the file to "write queue"</para>
        </listitem>
        <listitem>
          <para>
            Writing of the queued changes is triggered either
            <link linkend="Buttons">manually</link>
            or as defined in
            <link linkend="GuideOptionsMetadata" endterm="titleGuideOptionsMetadata" />. It is possible to review the changes and exclude selected files.
          </para>
        </listitem>
      </itemizedlist>
      <para />
    </section>
    <section id="Writealgorithm">
      <title>Write algorithm</title>
      <orderedlist spacing="compact">
        <listitem>
          <para>
            Exif and IPTC are updated from XMP (for example
            <emphasis>Exif.Image.Orientation</emphasis>
            is updated from
            <emphasis>Xmp.exif.orientation</emphasis>
            ). See
            <link linkend="GuideReferenceStandards">XMP</link>
            and
            <link linkend="GuideReferenceStandards">IPTC4XMP</link>
            specifications for the list of corresponding tags.
          </para>
        </listitem>
        <listitem>
          <para>
            Try to write metadata in the order specified in the
            <link linkend="MetadataWritingProcess" endterm="titleMetadataWritingProcess" />
            section of Preferences.
          </para>
        </listitem>
        <listitem>
          <para>After the first successful write attempt delete old metadata files in all possible locations.</para>
        </listitem>
      </orderedlist>
      <para />
    </section>
  </section>
  <section id="Optionsthatinfluencestheprocess">
    <title>Options that influence the process</title>
    <para>
      File types with allowed sidecars are listed in the
      <link linkend="GuideOptionsFiltering" endterm="titleGuideOptionsFiltering" />
      tab of the main Preferences.
    </para>
    <para />
  </section>
</section>
