## 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 http://www.metadataworkinggroup.org/ 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 this setting does not change automatically via the API).

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 | Y | IPTC:City XMP-photoshop:City CurrentIPTCDigest IPTCDigest |
> Copyright | Y | EXIF:Copyright IPTC:CopyrightNotice XMP-dc:Rights CurrentIPTCDigest IPTCDigest |
> Country | Y | IPTC:Country-PrimaryLocationName XMP-photoshop:Country CurrentIPTCDigest IPTCDigest |
> CreateDate | Y | EXIF:CreateDate EXIF:SubSecTimeDigitized IPTC:DigitalCreationDate IPTC:DigitalCreationTime XMP-xmp:CreateDate CurrentIPTCDigest IPTCDigest | ("creation date of the digital representation" - MWG)
> Creator | Y+ | EXIF:Artist IPTC:By-line XMP-dc:Creator CurrentIPTCDigest IPTCDigest |
> DateTimeOriginal | Y | EXIF:DateTimeOriginal EXIF:SubSecTimeOriginal IPTC:DateCreated IPTC:TimeCreated XMP-photoshop:DateCreated CurrentIPTCDigest IPTCDigest | ("creation date of the intellectual content being shown" - MWG)
> Description | Y | EXIF:ImageDescription IPTC:Caption-Abstract XMP-dc:Description CurrentIPTCDigest IPTCDigest |
> Keywords | Y+ | IPTC:Keywords XMP-dc:Subject CurrentIPTCDigest IPTCDigest |
> Location | Y | IPTC:Sub-location XMP-iptcCore:Location CurrentIPTCDigest IPTCDigest |
> ModifyDate | Y | EXIF:ModifyDate EXIF:SubSecTime XMP-xmp:ModifyDate CurrentIPTCDigest IPTCDigest | ("modification date of the digital image file" - MWG)
> Orientation | Y | 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 | Y | XMP-xmp:Rating |
> State | Y | IPTC:Province-State XMP-photoshop:State CurrentIPTCDigest IPTCDigest |

## MWG Regions Tags

Image region metadata defined by the MWG 2.0 specification. These tags belong to the ExifTool XMP-mwg-rs group, and as such they may be accessed without the need to load the MWG Composite tags above. See http://www.metadataworkinggroup.org/ for the official specification.

> Tag Name | Writable | Values / Notes
> --- | --- | ---
> RegionInfo | struct | --> 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)
> RegionSeeAlso | string_+ | (RegionsRegionListSeeAlso)
> RegionType | string_+ | (RegionsRegionListType) 'BarCode' = BarCode 'Face' = Face 'Focus' = Focus 'Pet' = Pet

## MWG RegionStruct Struct

> Field Name | Writable | Values / Notes
> --- | --- | ---
> Area | Area | --> Area Struct
> BarCodeValue | string |
> Description | string |
> Extensions | MWG Extensions | --> MWG Extensions Struct
> FocusUsage | string |
> Name | string |
> Type | string |
> 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 (ie. `{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. These tags belong to the ExifTool XMP-mwg-kw group. 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 http://www.metadataworkinggroup.org/ for the official specification.

> Tag Name | Writable | Values / Notes
> --- | --- | ---
> KeywordInfo | struct | --> 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 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. These tags belong to the ExifTool XMP-mwg-coll group. See http://www.metadataworkinggroup.org/ for the official specification.

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

(This document generated automatically by Image::ExifTool::BuildTagLookup)
Last revised Jan 31, 2013

<-- ExifTool Tag Names