## MWG Tags

The Metadata Working Group (MWG) recommends techniques to allow certain overlapping EXIF, IPTC and XMP tags to be reconciled when reading, and synchronized when writing. The MWG Composite tags below are designed to aid in the implementation of these recommendations. As well, the MWG defines new XMP tags which are listed in the subsequent tables below. See https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf for the official MWG specification.

## MWG Composite Tags

The table below lists special Composite tags which are used to access other tags based on the MWG 2.0 recommendations. These tags are only accessible when explicitly loaded, but this is done automatically by the exiftool application if MWG is specified as a group for any tag on the command line, or manually with the `-use MWG` option. Via the API, the MWG Composite tags are loaded by calling "`Image::ExifTool::MWG::Load()`".

When reading, the value of each MWG tag is Derived From the specified tags based on the MWG guidelines. When writing, the appropriate associated tags are written. The value of the IPTCDigest tag is updated automatically when the IPTC is changed if either the IPTCDigest tag didn't exist beforehand or its value agreed with the original IPTC digest (indicating that the XMP is synchronized with the IPTC). IPTC information is written only if the original file contained IPTC.

Loading the MWG module activates "strict MWG conformance mode", which has the effect of causing EXIF, IPTC and XMP in non-standard locations to be ignored when reading, as per the MWG recommendations. Instead, a "Warning" tag is generated when non-standard metadata is encountered. This feature may be disabled by setting `$Image::ExifTool::MWG::strict = 0` in the ExifTool config file (or from your Perl script when using the API). Note that the behaviour when writing is not changed: ExifTool always creates new records only in the standard location, but writes new tags to any EXIF/IPTC/XMP records that exist.

Contrary to the EXIF specification, the MWG recommends that EXIF "ASCII" string values be stored as UTF-8. To honour this, the exiftool application sets the default internal EXIF string encoding to "UTF8" when the MWG module is loaded, but via the API this must be done manually by setting the CharsetEXIF option.

A complication of the MWG specification is that although the MWG:Creator property may consist of multiple values, the associated EXIF tag (EXIF:Artist) is only a simple string. To resolve this discrepancy the MWG recommends a technique which allows a list of values to be stored in a string by using a semicolon-space separator (with quotes around values if necessary). When the MWG module is loaded, ExifTool automatically implements this policy and changes EXIF:Artist to a list-type tag.

> Tag Name | Writable | Derived From | Values / Notes
> --- | --- | --- | ---
> City | yes | IPTC:City XMP-photoshop:City XMP-iptcExt:LocationShownCity CurrentIPTCDigest IPTCDigest |
> Copyright | yes | EXIF:Copyright IPTC:CopyrightNotice XMP-dc:Rights CurrentIPTCDigest IPTCDigest |
> Country | yes | IPTC:Country-PrimaryLocationName XMP-photoshop:Country XMP-iptcExt:LocationShownCountryName CurrentIPTCDigest IPTCDigest |
> CreateDate | yes | Composite:SubSecCreateDate EXIF:CreateDate IPTC:DigitalCreationDate IPTC:DigitalCreationTime XMP-xmp:CreateDate CurrentIPTCDigest IPTCDigest | ("specifies when an image was digitized" - MWG)
> Creator | yes+ | EXIF:Artist IPTC:By-line XMP-dc:Creator CurrentIPTCDigest IPTCDigest |
> DateTimeOriginal | yes | Composite:SubSecDateTimeOriginal EXIF:DateTimeOriginal IPTC:DateCreated IPTC:TimeCreated XMP-photoshop:DateCreated CurrentIPTCDigest IPTCDigest | ("specifies when a photo was taken" - MWG)
> Description | yes | EXIF:ImageDescription IPTC:Caption-Abstract XMP-dc:Description CurrentIPTCDigest IPTCDigest |
> Keywords | yes+ | IPTC:Keywords XMP-dc:Subject CurrentIPTCDigest IPTCDigest |
> Location | yes | IPTC:Sub-location XMP-iptcCore:Location XMP-iptcExt:LocationShownSublocation CurrentIPTCDigest IPTCDigest |
> ModifyDate | yes | Composite:SubSecModifyDate EXIF:ModifyDate XMP-xmp:ModifyDate CurrentIPTCDigest IPTCDigest | ("specifies when a file was modified by the user" - MWG)
> Orientation | yes | EXIF:Orientation |
> 1 = Horizontal (normal) 2 = Mirror horizontal 3 = Rotate 180 4 = Mirror vertical 5 = Mirror horizontal and rotate 270 CW 6 = Rotate 90 CW 7 = Mirror horizontal and rotate 90 CW 8 = Rotate 270 CW
> Rating | yes | XMP-xmp:Rating |
> State | yes | IPTC:Province-State XMP-photoshop:State XMP-iptcExt:LocationShownProvinceState CurrentIPTCDigest IPTCDigest |

## MWG Regions Tags

Image region metadata defined by the MWG 2.0 specification. These tags may be accessed without the need to load the MWG Composite tags above. See https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf for the official specification.

These tags belong to the ExifTool XMP-mwg-rs family 1 group.

> Tag Name | Writable | Values / Notes
> --- | --- | ---
> RegionInfo | struct | --> MWG RegionInfo Struct (called Regions by the spec)
> RegionAppliedToDimensions | struct_ | --> Dimensions Struct (RegionsAppliedToDimensions)
> RegionAppliedToDimensionsH | real_ | (RegionsAppliedToDimensionsH)
> RegionAppliedToDimensionsUnit | string_ | (RegionsAppliedToDimensionsUnit)
> RegionAppliedToDimensionsW | real_ | (RegionsAppliedToDimensionsW)
> RegionList | struct_+ | --> MWG RegionStruct Struct (RegionsRegionList)
> RegionArea | struct_+ | --> Area Struct (RegionsRegionListArea)
> RegionAreaD | real_+ | (RegionsRegionListAreaD)
> RegionAreaH | real_+ | (RegionsRegionListAreaH)
> RegionAreaUnit | string_+ | (RegionsRegionListAreaUnit)
> RegionAreaW | real_+ | (RegionsRegionListAreaW)
> RegionAreaX | real_+ | (RegionsRegionListAreaX)
> RegionAreaY | real_+ | (RegionsRegionListAreaY)
> RegionBarCodeValue | string_+ | (RegionsRegionListBarCodeValue)
> RegionDescription | string_+ | (RegionsRegionListDescription)
> RegionExtensions | struct_+ | --> MWG Extensions Struct (RegionsRegionListExtensions)
> RegionFocusUsage | string_+ | (RegionsRegionListFocusUsage) 'EvaluatedNotUsed' = Evaluated, Not Used 'EvaluatedUsed' = Evaluated, Used 'NotEvaluatedNotUsed' = Not Evaluated, Not Used
> RegionName | string_+ | (RegionsRegionListName)
> RegionRotation | real_+ | (RegionsRegionListRotation; not part of MWG 2.0 spec)
> RegionSeeAlso | string_+ | (RegionsRegionListSeeAlso)
> RegionType | string_+ | (RegionsRegionListType) 'BarCode' = BarCode 'Face' = Face 'Focus' = Focus 'Pet' = Pet

## MWG RegionInfo Struct

> Field Name | Writable | Values / Notes
> --- | --- | ---
> AppliedToDimensions | Dimensions | --> Dimensions Struct
> RegionList | MWG RegionStruct+ | --> MWG RegionStruct Struct

## MWG RegionStruct Struct

> Field Name | Writable | Values / Notes
> --- | --- | ---
> Area | Area | --> Area Struct
> BarCodeValue | string |
> Description | string |
> Extensions | MWG Extensions | --> MWG Extensions Struct
> FocusUsage | string | EvaluatedNotUsed = Evaluated, Not Used EvaluatedUsed = Evaluated, Used NotEvaluatedNotUsed = Not Evaluated, Not Used
> Name | string |
> Rotation | real | (not part of MWG 2.0 spec)
> Type | string | BarCode = BarCode Face = Face Focus = Focus Pet = Pet
> SeeAlso | string |

## MWG Extensions Struct

This structure may contain any top-level XMP tags, but none have been pre-defined in ExifTool. Since no flattened tags have been pre-defined, RegionExtensions is writable only as a structure (eg. `{xmp-dc:creator=me,rating=5}`). Fields for this structure are identified using the standard ExifTool tag name (with optional leading group name, and/or trailing language code, and/or trailing `#` symbol to disable print conversion).

> Field Name | Writable | Values / Notes
> --- | --- | ---
> [no tags known]

## MWG Keywords Tags

Hierarchical keywords metadata defined by the MWG 2.0 specification. ExifTool unrolls keyword structures to an arbitrary depth of 6 to allow individual levels to be accessed with different tag names, and to avoid infinite recursion. See https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf for the official specification.

These tags belong to the ExifTool XMP-mwg-kw family 1 group.

> Tag Name | Writable | Values / Notes
> --- | --- | ---
> KeywordInfo | struct | --> MWG KeywordInfo Struct (called Keywords by the spec)
> HierarchicalKeywords | struct_+ | --> MWG KeywordStruct Struct (KeywordsHierarchy)
> HierarchicalKeywords1Applied | boolean_+ | (KeywordsHierarchyApplied)
> HierarchicalKeywords1Children | struct_+ | --> MWG KeywordStruct Struct (KeywordsHierarchyChildren)
> HierarchicalKeywords2Applied | boolean_+ | (KeywordsHierarchyChildrenApplied)
> HierarchicalKeywords2Children | struct_+ | --> MWG KeywordStruct Struct (KeywordsHierarchyChildrenChildren)
> HierarchicalKeywords3Applied | boolean_+ | (KeywordsHierarchyChildrenChildrenApplied)
> HierarchicalKeywords3Children | struct_+ | --> MWG KeywordStruct Struct (KeywordsHierarchyChildrenChildrenChildren)
> HierarchicalKeywords4Applied | boolean_+ | (KeywordsHierarchyChildrenChildrenChildrenApplied)
> HierarchicalKeywords4Children | struct_+ | --> MWG KeywordStruct Struct (KeywordsHierarchyChildrenChildrenChildrenChildren)
> HierarchicalKeywords5Applied | boolean_+ | (KeywordsHierarchyChildrenChildrenChildrenChildrenApplied)
> HierarchicalKeywords5Children | struct_+ | --> MWG KeywordStruct Struct (KeywordsHierarchyChildrenChildrenChildrenChildrenChildren)
> HierarchicalKeywords6Applied | boolean_+ | (KeywordsHierarchyChildrenChildrenChildrenChildrenChildrenApplied)
> HierarchicalKeywords6 | string_+ | (KeywordsHierarchyChildrenChildrenChildrenChildrenChildrenKeyword)
> HierarchicalKeywords5 | string_+ | (KeywordsHierarchyChildrenChildrenChildrenChildrenKeyword)
> HierarchicalKeywords4 | string_+ | (KeywordsHierarchyChildrenChildrenChildrenKeyword)
> HierarchicalKeywords3 | string_+ | (KeywordsHierarchyChildrenChildrenKeyword)
> HierarchicalKeywords2 | string_+ | (KeywordsHierarchyChildrenKeyword)
> HierarchicalKeywords1 | string_+ | (KeywordsHierarchyKeyword)

## MWG KeywordInfo Struct

> Field Name | Writable | Values / Notes
> --- | --- | ---
> Hierarchy | MWG KeywordStruct+ | --> MWG KeywordStruct Struct

## MWG KeywordStruct Struct

> Field Name | Writable | Values / Notes
> --- | --- | ---
> Applied | boolean |
> Children | MWG KeywordStruct+ | --> MWG KeywordStruct Struct
> Keyword | string |

## MWG Collections Tags

Collections metadata defined by the MWG 2.0 specification. See https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf for the official specification.

These tags belong to the ExifTool XMP-mwg-coll family 1 group.

> Tag Name | Writable | Values / Notes
> --- | --- | ---
> Collections | struct+ | --> MWG CollectionInfo Struct
> CollectionName | string_+ | (CollectionsCollectionName)
> CollectionURI | string_+ | (CollectionsCollectionURI)

## MWG CollectionInfo Struct

> Field Name | Writable | Values / Notes
> --- | --- | ---
> CollectionName | string |
> CollectionURI | string |

(This document generated automatically by Image::ExifTool::BuildTagLookup)
Last revised Apr 1, 2021

<-- ExifTool Tag Names