exiftool-vendored
    Preparing search index...

    Function tag

    • Look up a tag value by name, working with both bare Tags and group-prefixed GroupedTags metadata objects:

      1. An exact key match always wins.
      2. A group-prefixed name (like "EXIF:Make") falls back to its bare name ("Make"), so prefixed lookups also work against bare-mode tags. Against a grouped read it will not match the same tag name from a different group. Note that against a bare-mode read, the fallback returns the bare merged value, whose original group is unknowable (ExifTool's internal priority picked it, and it may have come from a different group than the one you asked for).
      3. A bare name (like "Make") falls back to scanning for any Group:name key. If several groups have the same tag name, the last one wins, matching the degrouped view that ExifTool.read uses for its timezone and video-detection heuristics.

      Because of those fallbacks, a name that exists in both the bare Tags and GroupedTags namespaces is typed as the union of both declarations (GPSLatitude is a validated number as a bare key of a grouped read, but may be a raw string in bare mode or via the degrouped fallback).

      Type Parameters

      Parameters

      Returns GroupedTags[K] | (K extends keyof Tags ? Tags[K] : never) | undefined

      the tag value, or undefined if the tag is missing or tags is nullish.

    • Look up a tag value by name, working with both bare Tags and group-prefixed GroupedTags metadata objects:

      1. An exact key match always wins.
      2. A group-prefixed name (like "EXIF:Make") falls back to its bare name ("Make"), so prefixed lookups also work against bare-mode tags. Against a grouped read it will not match the same tag name from a different group. Note that against a bare-mode read, the fallback returns the bare merged value, whose original group is unknowable (ExifTool's internal priority picked it, and it may have come from a different group than the one you asked for).
      3. A bare name (like "Make") falls back to scanning for any Group:name key. If several groups have the same tag name, the last one wins, matching the degrouped view that ExifTool.read uses for its timezone and video-detection heuristics.

      Because of those fallbacks, a name that exists in both the bare Tags and GroupedTags namespaces is typed as the union of both declarations (GPSLatitude is a validated number as a bare key of a grouped read, but may be a raw string in bare mode or via the degrouped fallback).

      Type Parameters

      • K extends keyof Tags

      Parameters

      Returns Tags[K] | undefined

      the tag value, or undefined if the tag is missing or tags is nullish.