## MWG Composite Tags

The Metadata Working Group (MWG) recommendations provide a set of rules to allow certain overlapping EXIF, IPTC and XMP tags to be reconciled when reading, and synchronized when writing. The ExifTool MWG module is designed to aid in the implementation of these recommendations. (See http://www.metadataworkinggroup.org/ for the complete MWG technical specifications.)

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 the MWG module is loaded. The MWG module is loaded 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 module is loaded with "`use Image::ExifTool::MWG`".

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 |

(This document generated automatically by Image::ExifTool::BuildTagLookup)
Last revised Oct 26, 2011

<-- ExifTool Tag Names