#------------------------------------------------------------------------------
# File:         xmp2exif.args
#
# Description:  Tag name translations for converting XMP to EXIF
#
# Usage:        exiftool -tagsFromFile SRCFILE -@ xmp2exif.args DSTFILE
#
# Requires:     ExifTool version 10.96 or later
#
# Revisions:    2009/01/20 - P. Harvey Created
#               2011/06/22 - PH Copy flash information via Composite:Flash
#               2013/06/12 - PH Additions for the Exif 2.3 for XMP spec
#               2015/01/12 - PH Avoid copying from non-standard namespaces
#               2016/09/26 - PH Write Composite SubSec tags
#               2018/05/07 - PH Added support for GPSDestXxxRef tags
#               2021/09/30 - PH Removed erroneous "-" when copying CreatorTool
#               2022/03/31 - PH IPTC Photometadata Mapping Guidelines 2202.1 update
#               2023/01/30 - PH Also write Composite:SubSecDateTimeOriginal from
#                               XMP-exif:DateTimeOriginal
#               2024/10/24 - PH Additions for the 2024 EXIF for XMP spec
#               2025/01/16 - PH Write Composite:SubSecCreateDate from XMP-exif
#               2025-04-22 - PH Fixed DigitalImageGUID translation
#
# References:   http://www.metadataworkinggroup.org/specs/
#               https://iptc.org/std/photometadata/documentation/mappingguidelines/
#
# Notes:     1) The first three arguments copy the bulk of the EXIF and GPS
#               information, and the remaining arguments handle the tags
#               which have different names and/or formats in XMP and EXIF.
#
#            2) These arguments will not delete existing EXIF tags which are
#               missing from the XMP.  The EXIF tags should be deleted
#               beforehand if required.
#
#            3) XMP-iptcExt:ImageRegion is not currently mapped into EXIF:SubjectArea
#------------------------------------------------------------------------------
-EXIF:all < XMP-exif:all
-EXIF:all < XMP-exifEX:all
-EXIF:all < XMP-tiff:all
-EXIF:ImageDescription < XMP-dc:Description
-EXIF:DateTimeOriginal < XMP-photoshop:DateCreated
# new for the 2024 EXIF for XMP specification
-EXIF:ISO < XMP-exifEX:PhotographicSensitivity
# the following SubSec tags also write/delete the corresponding EXIF
# SubSecTime and OffsetTime tags as appropriate
-Composite:SubSecDateTimeOriginal < XMP-exif:DateTimeOriginal
-Composite:SubSecDateTimeOriginal < XMP-photoshop:DateCreated
-Composite:SubSecCreateDate < XMP-exif:DateTimeDigitized
-Composite:SubSecCreateDate < XMP-xmp:CreateDate
-Composite:SubSecModifyDate < XMP-xmp:ModifyDate
-EXIF:Software < XMP-xmp:CreatorTool
-EXIF:Copyright < XMP-dc:Rights
-EXIF:Artist < XMP-plus:ImageCreatorName
-EXIF:Artist < XMP-dc:Creator
-EXIF:ImageUniqueID < XMP-iptcExt:DigitalImageGUID
# XMP flash information is translated by the Composite Flash tag
-EXIF:Flash < Composite:Flash
# generate GPS tags which have been combined into other XMP tags
-GPS:GPSLatitudeRef < Composite:GPSLatitudeRef
-GPS:GPSLongitudeRef < Composite:GPSLongitudeRef
-GPS:GPSDestLatitudeRef < Composite:GPSDestLatitudeRef
-GPS:GPSDestLongitudeRef < Composite:GPSDestLongitudeRef
-GPS:GPSDatestamp < XMP-exif:GPSDateTime
-GPS:GPSTimestamp < XMP-exif:GPSDateTime
# end
