Project

General

Profile

RE: Identified (but un-delete-able) XMP key data. ยป properties.cpp-nsinfoadded.c

Steve Wright, 12 Feb 2010 15:47

 
1
// ***************************************************************** -*- C++ -*-
2
/*
3
 * Copyright (C) 2004-2009 Andreas Huggel <ahuggel@gmx.net>
4
 *
5
 * This program is part of the Exiv2 distribution.
6
 *
7
 * This program is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU General Public License
9
 * as published by the Free Software Foundation; either version 2
10
 * of the License, or (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program; if not, write to the Free Software
19
 * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
20
 */
21
/*
22
  File:      properties.cpp
23
  Version:   $Rev: 1977 $
24
  Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
25
             Gilles Caulier (cgilles) <caulier dot gilles at gmail dot com>
26
  History:   13-July-07, ahu: created
27
 */
28
// *****************************************************************************
29
#include "rcsid.hpp"
30
EXIV2_RCSID("@(#) $Id: properties.cpp 1977 2009-12-28 14:47:58Z ahuggel $")
31

    
32
// *****************************************************************************
33
// included header files
34
#include "properties.hpp"
35
#include "tags.hpp"
36
#include "error.hpp"
37
#include "types.hpp"
38
#include "value.hpp"
39
#include "metadatum.hpp"
40
#include "i18n.h"                // NLS support.
41
#include "xmp.hpp"
42

    
43
#include <iostream>
44
#include <iomanip>
45
#include <sstream>
46
#include <cstring>
47
#include <cstdlib>
48

    
49
// *****************************************************************************
50
namespace {
51

    
52
    //! Struct used in the lookup table for pretty print functions
53
    struct XmpPrintInfo {
54
        //! Comparison operator for key
55
        bool operator==(const std::string& key) const
56
        {
57
            return 0 == strcmp(key_, key.c_str());
58
        }
59

    
60
        const char* key_;               //!< XMP key
61
        Exiv2::PrintFct printFct_;             //!< Print function
62
    };
63

    
64
}
65

    
66
// *****************************************************************************
67
// class member definitions
68
namespace Exiv2 {
69

    
70
    //! @cond IGNORE
71
    extern const XmpPropertyInfo xmpDcInfo[];
72
    extern const XmpPropertyInfo xmpDigikamInfo[];
73
    extern const XmpPropertyInfo xmpXmpInfo[];
74
    extern const XmpPropertyInfo xmpXmpRightsInfo[];
75
    extern const XmpPropertyInfo xmpXmpMMInfo[];
76
    extern const XmpPropertyInfo xmpXmpBJInfo[];
77
    extern const XmpPropertyInfo xmpXmpTPgInfo[];
78
    extern const XmpPropertyInfo xmpXmpDMInfo[];
79
    extern const XmpPropertyInfo xmpMicrosoftInfo[];
80
    extern const XmpPropertyInfo xmpPdfInfo[];
81
    extern const XmpPropertyInfo xmpPhotoshopInfo[];
82
    extern const XmpPropertyInfo xmpCrsInfo[];
83
    extern const XmpPropertyInfo xmpTiffInfo[];
84
    extern const XmpPropertyInfo xmpExifInfo[];
85
    extern const XmpPropertyInfo xmpAuxInfo[];
86
    extern const XmpPropertyInfo xmpIptcInfo[];
87
    extern const XmpPropertyInfo xmpIptcExtInfo[];
88
    extern const XmpPropertyInfo xmpPlusInfo[];
89
    extern const XmpPropertyInfo XmpmediaproInfo[];
90
    extern const XmpPropertyInfo XmpexpressionmediaInfo[];
91

    
92
    extern const XmpNsInfo xmpNsInfo[] = {
93
        // Schemas   -   NOTE: Schemas which the XMP-SDK doesn't know must be registered in XmpParser::initialize - Todo: Automate this
94
        { "http://purl.org/dc/elements/1.1/",             "dc",             xmpDcInfo,        N_("Dublin Core schema")                        },
95
        { "http://www.digikam.org/ns/1.0/",               "digiKam",        xmpDigikamInfo,   N_("digiKam Photo Management schema")           },
96
        { "http://ns.adobe.com/xap/1.0/",                 "xmp",            xmpXmpInfo,       N_("XMP Basic schema")                          },
97
        { "http://ns.adobe.com/xap/1.0/rights/",          "xmpRights",      xmpXmpRightsInfo, N_("XMP Rights Management schema")              },
98
        { "http://ns.adobe.com/xap/1.0/mm/",              "xmpMM",          xmpXmpMMInfo,     N_("XMP Media Management schema")               },
99
        { "http://ns.adobe.com/xap/1.0/bj/",              "xmpBJ",          xmpXmpBJInfo,     N_("XMP Basic Job Ticket schema")               },
100
        { "http://ns.adobe.com/xap/1.0/t/pg/",            "xmpTPg",         xmpXmpTPgInfo,    N_("XMP Paged-Text schema")                     },
101
        { "http://ns.adobe.com/xmp/1.0/DynamicMedia/",    "xmpDM",          xmpXmpDMInfo,     N_("XMP Dynamic Media schema")                  },
102
        { "http://ns.microsoft.com/photo/1.0/",           "MicrosoftPhoto", xmpMicrosoftInfo, N_("Microsoft Photo schema")                    },
103
        { "http://ns.adobe.com/pdf/1.3/",                 "pdf",            xmpPdfInfo,       N_("Adobe PDF schema")                          },
104
        { "http://ns.adobe.com/photoshop/1.0/",           "photoshop",      xmpPhotoshopInfo, N_("Adobe photoshop schema")                    },
105
        { "http://ns.adobe.com/camera-raw-settings/1.0/", "crs",            xmpCrsInfo,       N_("Camera Raw schema")                         },
106
        { "http://ns.adobe.com/tiff/1.0/",                "tiff",           xmpTiffInfo,      N_("Exif Schema for TIFF Properties")           },
107
        { "http://ns.adobe.com/exif/1.0/",                "exif",           xmpExifInfo,      N_("Exif schema for Exif-specific Properties")  },
108
        { "http://ns.adobe.com/exif/1.0/aux/",            "aux",            xmpAuxInfo,       N_("Exif schema for Additional Exif Properties")},
109
        { "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/",  "iptc",           xmpIptcInfo,      N_("IPTC Core schema")                          },
110
                                                                                             // NOTE: 'Iptc4xmpCore' is just too long
111
        { "http://iptc.org/std/Iptc4xmpExt/2008-02-29/",  "iptcExt",        xmpIptcExtInfo,   N_("IPTC Extension schema")                     },
112
                                                                                             // NOTE: It really should be 'Iptc4xmpExt' but following example above
113
        { "http://ns.useplus.org/ldf/xmp/1.0/",           "plus",           xmpPlusInfo,      N_("PLUS License Data Format schema")           },
114
        { "http://ns.iview-multimedia.com/mediapro/1.0/",           "mediapro",           XmpmediaproInfo,      N_("iView Media Pro schema")           },
115
        { "http://ns.microsoft.com/expressionmedia/1.0/",           "expressionmedia",           XmpexpressionmediaInfo,      N_("Expression Media schema")           },
116
        
117
        // Structures
118
        { "http://ns.adobe.com/xap/1.0/g/",                   "xapG",    0, N_("Colorant structure")           },
119
        { "http://ns.adobe.com/xap/1.0/sType/Dimensions#",    "stDim",   0, N_("Dimensions structure")         },
120
        { "http://ns.adobe.com/xap/1.0/sType/Font#",          "stFnt",   0, N_("Font structure")               },
121
        { "http://ns.adobe.com/xap/1.0/g/img/",               "xapGImg", 0, N_("Thumbnail structure")          },
122
        { "http://ns.adobe.com/xap/1.0/sType/ResourceEvent#", "stEvt",   0, N_("Resource Event structure")     },
123
        { "http://ns.adobe.com/xap/1.0/sType/ResourceRef#",   "stRef",   0, N_("ResourceRef structure")        },
124
        { "http://ns.adobe.com/xap/1.0/sType/Version#",       "stVer",   0, N_("Version structure")            },
125
        { "http://ns.adobe.com/xap/1.0/sType/Job#",           "stJob",   0, N_("Basic Job/Workflow structure") },
126

    
127
        // Qualifiers
128
        { "http://ns.adobe.com/xmp/Identifier/qual/1.0/", "xmpidq", 0, N_("Qualifier for xmp:Identifier") }
129
    };
130

    
131
    extern const XmpPropertyInfo xmpDcInfo[] = {
132
        { "contributor",      N_("Contributor"),      "bag ProperName",  xmpBag,       xmpExternal, N_("Contributors to the resource (other than the authors).")                               },
133
        { "coverage",         N_("Coverage"),         "Text",            xmpText,      xmpExternal, N_("The spatial or temporal topic of the resource, the spatial applicability of the "
134
                                                                                                   "resource, or the jurisdiction under which the resource is relevant.")                      },
135
        { "creator",          N_("Creator"),          "seq ProperName",  xmpSeq,       xmpExternal, N_("The authors of the resource (listed in order of precedence, if significant).")         },
136
        { "date",             N_("Date"),             "seq Date",        xmpSeq,       xmpExternal, N_("Date(s) that something interesting happened to the resource.")                         },
137
        { "description",      N_("Description"),      "Lang Alt",        langAlt,      xmpExternal, N_("A textual description of the content of the resource. Multiple values may be "
138
                                                                                                       "present for different languages.")                                                     },
139
        { "format",           N_("Format"),           "MIMEType",        xmpText,      xmpInternal, N_("The file format used when saving the resource. Tools and applications should set "
140
                                                                                                       "this property to the save format of the data. It may include appropriate qualifiers.") },
141
        { "identifier",       N_("Identifier"),       "Text",            xmpText,      xmpExternal, N_("Unique identifier of the resource. Recommended best practice is to identify the "
142
                                                                                                   "resource by means of a string conforming to a formal identification system.")              },
143
        { "language",         N_("Language"),         "bag Locale",      xmpBag,       xmpInternal, N_("An unordered array specifying the languages used in the resource.")                    },
144
        { "publisher",        N_("Publisher"),        "bag ProperName",  xmpBag,       xmpExternal, N_("An entity responsible for making the resource available. Examples of a Publisher "
145
                                                                                                   "include a person, an organization, or a service. Typically, the name of a Publisher "
146
                                                       "should be used to indicate the entity.")                                               },
147
        { "relation",         N_("Relation"),         "bag Text",        xmpBag,       xmpInternal, N_("Relationships to other documents. Recommended best practice is to identify the "
148
                                                                                                   "related resource by means of a string conforming to a formal identification system.")      },
149
        { "rights",           N_("Rights"),           "Lang Alt",        langAlt,      xmpExternal, N_("Informal rights statement, selected by language. Typically, rights information "
150
                                                                                                   "includes a statement about various property rights associated with the resource, "
151
                                                       "including intellectual property rights.")                                              },
152
        { "source",           N_("Source"),           "Text",            xmpText,      xmpExternal, N_("Unique identifier of the work from which this resource was derived.")                  },
153
        { "subject",          N_("Subject"),          "bag Text",        xmpBag,       xmpExternal, N_("An unordered array of descriptive phrases or keywords that specify the topic of the "
154
                                                                                                       "content of the resource.")                                                             },
155
        { "title",            N_("Title"),            "Lang Alt",        langAlt,      xmpExternal, N_("The title of the document, or the name given to the resource. Typically, it will be "
156
                                                                                                       "a name by which the resource is formally known.")                                      },
157
        { "type",             N_("Type"),             "bag open Choice", xmpBag,       xmpExternal, N_("A document type; for example, novel, poem, or working paper.")                         },
158
        // End of list marker
159
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
160
    };
161

    
162
    extern const XmpPropertyInfo xmpDigikamInfo[] = {
163
        { "TagsList",               N_("Tags List"),                 "seq Text", xmpSeq,  xmpExternal, N_("The list of complete tags path as string. The path hierarchy is separated by '/' character (ex.: \"City/Paris/Monument/Eiffel Tower\".") },
164
        { "CaptionsAuthorNames",    N_("Captions Author Names"),     "Lang Alt", langAlt, xmpExternal, N_("The list of all captions author names for each language alternative captions set in standard XMP tags.") },
165
        { "CaptionsDateTimeStamps", N_("Captions Date Time Stamps"), "Lang Alt", langAlt, xmpExternal, N_("The list of all captions date time stamps for each language alternative captions set in standard XMP tags.") },
166

    
167
        // End of list marker
168
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
169
    };
170

    
171
    extern const XmpPropertyInfo xmpXmpInfo[] = {
172
        { "Advisory",         N_("Advisory"),         "bag XPath",                xmpBag,    xmpExternal, N_("An unordered array specifying properties that were edited outside the authoring "
173
                                                                                                             "application. Each item should contain a single namespace and XPath separated by "
174
                                                                                                             "one ASCII space (U+0020).") },
175
        { "BaseURL",          N_("Base URL"),         "URL",                      xmpText,   xmpInternal, N_("The base URL for relative URLs in the document content. If this document contains "
176
                                                                                                             "Internet links, and those links are relative, they are relative to this base URL. "
177
                                                                                                             "This property provides a standard way for embedded relative URLs to be interpreted "
178
                                                                                                             "by tools. Web authoring tools should set the value based on their notion of where "
179
                                                                                                             "URLs will be interpreted.") },
180
        { "CreateDate",       N_("Create Date"),      "Date",                     xmpText,   xmpInternal, N_("The date and time the resource was originally created.") },
181
        { "CreatorTool",      N_("Creator Tool"),     "AgentName",                xmpText,   xmpInternal, N_("The name of the first known tool used to create the resource. If history is "
182
                                                                                                             "present in the metadata, this value should be equivalent to that of "
183
                                                                                                             "xmpMM:History's softwareAgent property.") },
184
        { "Identifier",       N_("Identifier"),       "bag Text",                 xmpBag,    xmpExternal, N_("An unordered array of text strings that unambiguously identify the resource within "
185
                                                                                                             "a given context. An array item may be qualified with xmpidq:Scheme to denote the "
186
                                                                                                             "formal identification system to which that identifier conforms. Note: The "
187
                                                                                                             "dc:identifier property is not used because it lacks a defined scheme qualifier and "
188
                                                                                                             "has been defined in the XMP Specification as a simple (single-valued) property.") },
189
        { "Label",            N_("Label"),            "Text",                     xmpText,   xmpExternal, N_("A word or short phrase that identifies a document as a member of a user-defined "
190
                                                                                                             "collection. Used to organize documents in a file browser.") },
191
        { "MetadataDate",     N_("Metadata Date"),    "Date",                     xmpText,   xmpInternal, N_("The date and time that any metadata for this resource was last changed. It should "
192
                                                                                                             "be the same as or more recent than xmp:ModifyDate.") },
193
        { "ModifyDate",       N_("Modify Date"),      "Date",                     xmpText,   xmpInternal, N_("The date and time the resource was last modified. Note: The value of this property "
194
                                                                                                             "is not necessarily the same as the file's system modification date because it is "
195
                                                                                                             "set before the file is saved.") },
196
        { "Nickname",         N_("Nickname"),         "Text",                     xmpText,   xmpExternal, N_("A short informal name for the resource.") },
197
        { "Rating",           N_("Rating"),           "Closed Choice of Integer", xmpText,   xmpExternal, N_("A number that indicates a document's status relative to other documents, "
198
                                                                                                             "used to organize documents in a file browser. Values are user-defined within an "
199
                                                                                                             "application-defined range.") },
200
        { "Thumbnails",       N_("Thumbnails"),       "alt Thumbnail",            undefined, xmpInternal, N_("An alternative array of thumbnail images for a file, which can differ in "
201
                                                                                                             "characteristics such as size or image encoding.") },
202
        // End of list marker
203
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
204
    };
205

    
206
    extern const XmpPropertyInfo xmpXmpRightsInfo[] = {
207
        { "Certificate",      N_("Certificate"),   "URL",            xmpText,       xmpExternal, N_("Online rights management certificate.") },
208
        { "Marked",           N_("Marked"),        "Boolean",        xmpText,       xmpExternal, N_("Indicates that this is a rights-managed resource.") },
209
        { "Owner",            N_("Owner"),         "bag ProperName", xmpBag,        xmpExternal, N_("An unordered array specifying the legal owner(s) of a resource.") },
210
        { "UsageTerms",       N_("Usage Terms"),   "Lang Alt",       langAlt,       xmpExternal, N_("Text instructions on how a resource can be legally used.") },
211
        { "WebStatement",     N_("Web Statement"), "URL",            xmpText,       xmpExternal, N_("The location of a web page describing the owner and/or rights statement for this resource.") },
212
        // End of list marker
213
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
214
    };
215

    
216
    extern const XmpPropertyInfo xmpXmpMMInfo[] = {
217
        { "DerivedFrom",      N_("Derived From"),      "ResourceRef",       xmpText,    xmpInternal, N_("A reference to the original document from which this one is derived. It is a "
218
                                                                                                        "minimal reference; missing components can be assumed to be unchanged. For example, "
219
                                                                                                        "a new version might only need to specify the instance ID and version number of the "
220
                                                                                                        "previous version, or a rendition might only need to specify the instance ID and "
221
                                                                                                        "rendition class of the original.") },
222
        { "DocumentID",       N_("Document ID"),       "URI",               xmpText,    xmpInternal, N_("The common identifier for all versions and renditions of a document. It should be "
223
                                                                                                        "based on a UUID; see Document and Instance IDs below.") },
224
        { "History",          N_("History"),           "seq ResourceEvent", xmpText,    xmpInternal, N_("An ordered array of high-level user actions that resulted in this resource. It is "
225
                                                                                                        "intended to give human readers a general indication of the steps taken to make the "
226
                                                                                                        "changes from the previous version to this one. The list should be at an abstract "
227
                                                                                                        "level; it is not intended to be an exhaustive keystroke or other detailed history.") },
228
        { "InstanceID",       N_("Instance ID"),       "URI",               xmpText,    xmpInternal, N_("An identifier for a specific incarnation of a document, updated each time a file "
229
                                                                                                        "is saved. It should be based on a UUID; see Document and Instance IDs below.") },
230
        { "ManagedFrom",      N_("Managed From"),      "ResourceRef",       xmpText,    xmpInternal, N_("A reference to the document as it was prior to becoming managed. It is set when a "
231
                                                                                                        "managed document is introduced to an asset management system that does not "
232
                                                                                                        "currently own it. It may or may not include references to different management systems.") },
233
        { "Manager",          N_("Manager"),           "AgentName",         xmpText,    xmpInternal, N_("The name of the asset management system that manages this resource. Along with "
234
                                                                                                        "xmpMM: ManagerVariant, it tells applications which asset management system to "
235
                                                                                                        "contact concerning this document.") },
236
        { "ManageTo",         N_("Manage To"),         "URI",               xmpText,    xmpInternal, N_("A URI identifying the managed resource to the asset management system; the presence "
237
                                                                                                        "of this property is the formal indication that this resource is managed. The form "
238
                                                                                                        "and content of this URI is private to the asset management system.") },
239
        { "ManageUI",         N_("Manage UI"),         "URI",               xmpText,    xmpInternal, N_("A URI that can be used to access information about the managed resource through a "
240
                                                                                                        "web browser. It might require a custom browser plug-in.") },
241
        { "ManagerVariant",   N_("Manager Variant"),   "Text",              xmpText,    xmpInternal, N_("Specifies a particular variant of the asset management system. The format of this "
242
                                                                                                        "property is private to the specific asset management system.") },
243
        { "RenditionClass",   N_("Rendition Class"),   "RenditionClass",    xmpText,    xmpInternal, N_("The rendition class name for this resource. This property should be absent or set "
244
                                                                                                        "to default for a document version that is not a derived rendition.") },
245
        { "RenditionParams",  N_("Rendition Params"),  "Text",              xmpText,    xmpInternal, N_("Can be used to provide additional rendition parameters that are too complex or "
246
                                                                                                        "verbose to encode in xmpMM: RenditionClass.") },
247
        { "VersionID",        N_("Version ID"),        "Text",              xmpText,    xmpInternal, N_("The document version identifier for this resource. Each version of a document gets "
248
                                                                                                        "a new identifier, usually simply by incrementing integers 1, 2, 3 . . . and so on. "
249
                                                                                                        "Media management systems can have other conventions or support branching which "
250
                                                                                                        "requires a more complex scheme.") },
251
        { "Versions",         N_("Versions"),          "seq Version",       xmpText,    xmpInternal, N_("The version history associated with this resource. Entry [1] is the oldest known "
252
                                                                                                        "version for this document, entry [last()] is the most recent version. Typically, a "
253
                                                                                                        "media management system would fill in the version information in the metadata on "
254
                                                                                                        "check-in. It is not guaranteed that a complete history  versions from the first to "
255
                                                                                                        "this one will be present in the xmpMM:Versions property. Interior version information "
256
                                                                                                        "can be compressed or eliminated and the version history can be truncated at some point.") },
257
        { "LastURL",          N_("Last URL"),          "URL",               xmpText,    xmpInternal, N_("Deprecated for privacy protection.") },
258
        { "RenditionOf",      N_("Rendition Of"),      "ResourceRef",       xmpText,    xmpInternal, N_("Deprecated in favor of xmpMM:DerivedFrom. A reference to the document of which this is "
259
                                                                                                        "a rendition.") },
260
        { "SaveID",           N_("Save ID"),           "Integer",           xmpText,    xmpInternal, N_("Deprecated. Previously used only to support the xmpMM:LastURL property.") },
261
        // End of list marker
262
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
263
    };
264

    
265
    extern const XmpPropertyInfo xmpXmpBJInfo[] = {
266
        { "JobRef",           N_("Job Reference"),     "bag Job",   xmpText,    xmpExternal, N_("References an external job management file for a job process in which the document is being used. Use of job "
267
                                                                                                "names is under user control. Typical use would be to identify all documents that are part of a particular job or contract. "
268
                                                                                                "There are multiple values because there can be more than one job using a particular document at any time, and it can "
269
                                                                                                "also be useful to keep historical information about what jobs a document was part of previously.") },
270
        // End of list marker
271
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
272
    };
273

    
274
    extern const XmpPropertyInfo xmpXmpTPgInfo[] = {
275
        { "MaxPageSize",      N_("Maximum Page Size"), "Dimensions",   xmpText,    xmpInternal, N_("The size of the largest page in the document (including any in contained documents).") },
276
        { "NPages",           N_("Number of Pages"),   "Integer",      xmpText,    xmpInternal, N_("The number of pages in the document (including any in contained documents).") },
277
        { "Fonts",            N_("Fonts"),             "bag Font",     xmpText,    xmpInternal, N_("An unordered array of fonts that are used in the document (including any in contained documents).") },
278
        { "Colorants",        N_("Colorants"),         "seq Colorant", xmpText,    xmpInternal, N_("An ordered array of colorants (swatches) that are used in the document (including any in contained documents).") },
279
        { "PlateNames",       N_("Plate Names"),       "seq Text",     xmpSeq,     xmpInternal, N_("An ordered array of plate names that are needed to print the document (including any in contained documents).") },
280
        // End of list marker
281
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
282
    };
283

    
284
    extern const XmpPropertyInfo xmpXmpDMInfo[] = {
285
        { "projectRef",                   N_("Project Reference"),                "ProjectLink",           xmpText, xmpInternal, N_("A reference to the project that created this file.") },
286
        { "videoFrameRate",               N_("Video Frame Rate"),                 "open Choice of Text",   xmpText, xmpInternal, N_("The video frame rate. One of: 24, NTSC, PAL.") },
287
        { "videoFrameSize",               N_("Video Frame Size"),                 "Dimensions",            xmpText, xmpInternal, N_("The frame size. For example: w:720, h: 480, unit:pixels") },
288
        { "videoPixelAspectRatio",        N_("Video Pixel Aspect Ratio"),         "Rational",              xmpText, xmpInternal, N_("The aspect ratio, expressed as ht/wd. For example: \"648/720\" = 0.9") },
289
        { "videoPixelDepth",              N_("Video Pixel Depth"),                "closed Choice of Text", xmpText, xmpInternal, N_("The size in bits of each color component of a pixel. Standard Windows 32-bit "
290
                                                                                                                                    "pixels have 8 bits per component. One of: 8Int, 16Int, 32Int, 32Float.") },
291
        { "videoColorSpace",              N_("Video Color Space"),                "closed Choice of Text", xmpText, xmpInternal, N_("The color space. One of: sRGB (used by Photoshop), CCIR-601 (used for NTSC), "
292
                                                                                                                                    "CCIR-709 (used for HD).") },
293
        { "videoAlphaMode",               N_("Video Alpha Mode"),                 "closed Choice of Text", xmpText, xmpExternal, N_("The alpha mode. One of: straight, pre-multiplied.") },
294
        { "videoAlphaPremultipleColor",   N_("Video Alpha Premultiple Color"),    "Colorant",              xmpText, xmpExternal, N_("A color in CMYK or RGB to be used as the pre-multiple color when "
295
                                                                                                                                    "alpha mode is pre-multiplied.") },
296
        { "videoAlphaUnityIsTransparent", N_("Video Alpha Unity Is Transparent"), "Boolean",               xmpText, xmpInternal, N_("When true, unity is clear, when false, it is opaque.") },
297
        { "videoCompressor",              N_("Video Compressor"),                 "Text",                  xmpText, xmpInternal, N_("Video compression used. For example, jpeg.") },
298
        { "videoFieldOrder",              N_("Video Field Order"),                "closed Choice of Text", xmpText, xmpInternal, N_("The field order for video. One of: Upper, Lower, Progressive.") },
299
        { "pullDown",                     N_("Pull Down"),                        "closed Choice of Text", xmpText, xmpInternal, N_("The sampling phase of film to be converted to video (pull-down). One of: "
300
                                                                                                                                    "WSSWW, SSWWW, SWWWS, WWWSS, WWSSW, WSSWW_24p, SSWWW_24p, SWWWS_24p, WWWSS_24p, WWSSW_24p.") },
301
        { "audioSampleRate",              N_("Audio Sample Rate"),                "Integer",               xmpText, xmpInternal, N_("The audio sample rate. Can be any value, but commonly 32000, 41100, or 48000.") },
302
        { "audioSampleType",              N_("Audio Sample Type"),                "closed Choice of Text", xmpText, xmpInternal, N_("The audio sample type. One of: 8Int, 16Int, 32Int, 32Float.") },
303
        { "audioChannelType",             N_("Audio Channel Type"),               "closed Choice of Text", xmpText, xmpInternal, N_("The audio channel type. One of: Mono, Stereo, 5.1, 7.1.") },
304
        { "audioCompressor",              N_("Audio Compressor"),                 "Text",                  xmpText, xmpInternal, N_("The audio compression used. For example, MP3.") },
305
        { "speakerPlacement",             N_("Speaker Placement"),                "Text",                  xmpText, xmpExternal, N_("A description of the speaker angles from center front in degrees. For example: "
306
                                                                                                                                    "\"Left = -30, Right = 30, Center = 0, LFE = 45, Left Surround = -110, Right Surround = 110\"") },
307
        { "fileDataRate",                 N_("File Data Rate"),                   "Rational",              xmpText, xmpInternal, N_("The file data rate in megabytes per second. For example: \"36/10\" = 3.6 MB/sec") },
308
        { "tapeName",                     N_("Tape Name"),                        "Text",                  xmpText, xmpExternal, N_("The name of the tape from which the clip was captured, as set during the capture process.") },
309
        { "altTapeName",                  N_("Alternative Tape Name"),            "Text",                  xmpText, xmpExternal, N_("An alternative tape name, set via the project window or timecode dialog in Premiere. "
310
                                                                                                                                    "If an alternative name has been set and has not been reverted, that name is displayed.") },
311
        { "startTimecode",                N_("Start Time Code"),                  "Timecode",              xmpText, xmpInternal, N_("The timecode of the first frame of video in the file, as obtained from the device control.") },
312
        { "altTimecode",                  N_("Alternative Time code"),            "Timecode",              xmpText, xmpExternal, N_("A timecode set by the user. When specified, it is used instead of the startTimecode.") },
313
        { "duration",                     N_("Duration"),                         "Time",                  xmpText, xmpInternal, N_("The duration of the media file.") },
314
        { "scene",                        N_("Scene"),                            "Text",                  xmpText, xmpExternal, N_("The name of the scene.") },
315
        { "shotName",                     N_("Shot Name"),                        "Text",                  xmpText, xmpExternal, N_("The name of the shot or take.") },
316
        { "shotDate",                     N_("Shot Date"),                        "Date",                  xmpText, xmpExternal, N_("The date and time when the video was shot.") },
317
        { "shotLocation",                 N_("Shot Location"),                    "Text",                  xmpText, xmpExternal, N_("The name of the location where the video was shot. For example: \"Oktoberfest, Munich Germany\" "
318
                                                                                                                                    "For more accurate positioning, use the EXIF GPS values.") },
319
        { "logComment",                   N_("Log Comment"),                      "Text",                  xmpText, xmpExternal, N_("User's log comments.") },
320
        { "markers",                      N_("Markers"),                          "seq Marker",            xmpText, xmpInternal, N_("An ordered list of markers") },
321
        { "contributedMedia",             N_("Contributed Media"),                "bag Media",             xmpText, xmpInternal, N_("An unordered list of all media used to create this media.") },
322
        { "absPeakAudioFilePath",         N_("Absolute Peak Audio File Path"),    "URI",                   xmpText, xmpInternal, N_("The absolute path to the file's peak audio file. If empty, no peak file exists.") },
323
        { "relativePeakAudioFilePath",    N_("Relative Peak Audio File Path"),    "URI",                   xmpText, xmpInternal, N_("The relative path to the file's peak audio file. If empty, no peak file exists.") },
324
        { "videoModDate",                 N_("Video Modified Date"),              "Date",                  xmpText, xmpInternal, N_("The date and time when the video was last modified.") },
325
        { "audioModDate",                 N_("Audio Modified Date"),              "Date",                  xmpText, xmpInternal, N_("The date and time when the audio was last modified.") },
326
        { "metadataModDate",              N_("Metadata Modified Date"),           "Date",                  xmpText, xmpInternal, N_("The date and time when the metadata was last modified.") },
327
        { "artist",                       N_("Artist"),                           "Text",                  xmpText, xmpExternal, N_("The name of the artist or artists.") },
328
        { "album",                        N_("Album"),                            "Text",                  xmpText, xmpExternal, N_("The name of the album.") },
329
        { "trackNumber",                  N_("Track Number"),                     "Integer",               xmpText, xmpExternal, N_("A numeric value indicating the order of the audio file within its original recording.") },
330
        { "genre",                        N_("Genre"),                            "Text",                  xmpText, xmpExternal, N_("The name of the genre.") },
331
        { "copyright",                    N_("Copyright"),                        "Text",                  xmpText, xmpExternal, N_("The copyright information.") },
332
        { "releaseDate",                  N_("Release Date"),                     "Date",                  xmpText, xmpExternal, N_("The date the title was released.") },
333
        { "composer",                     N_("Composer"),                         "Text",                  xmpText, xmpExternal, N_("The composer's name.") },
334
        { "engineer",                     N_("Engineer"),                         "Text",                  xmpText, xmpExternal, N_("The engineer's name.") },
335
        { "tempo",                        N_("Tempo"),                            "Real",                  xmpText, xmpInternal, N_("The audio's tempo.") },
336
        { "instrument",                   N_("Instrument"),                       "Text",                  xmpText, xmpExternal, N_("The musical instrument.") },
337
        { "introTime",                    N_("Intro Time"),                       "Time",                  xmpText, xmpInternal, N_("The duration of lead time for queuing music.") },
338
        { "outCue",                       N_("Out Cue"),                          "Time",                  xmpText, xmpInternal, N_("The time at which to fade out.") },
339
        { "relativeTimestamp",            N_("Relative Timestamp"),               "Time",                  xmpText, xmpInternal, N_("The start time of the media inside the audio project.") },
340
        { "loop",                         N_("Loop"),                             "Boolean",               xmpText, xmpInternal, N_("When true, the clip can be looped seemlessly.") },
341
        { "numberOfBeats",                N_("Number Of Beats"),                  "Real",                  xmpText, xmpInternal, N_("The number of beats.") },
342
        { "key",                          N_("Key"),                              "closed Choice of Text", xmpText, xmpInternal, N_("The audio's musical key. One of: C, C#, D, D#, E, F, F#, G, G#, A, A#, B.") },
343
        { "stretchMode",                  N_("Stretch Mode"),                     "closed Choice of Text", xmpText, xmpInternal, N_("The audio stretch mode. One of: Fixed length, Time-Scale, Resample, Beat Splice, Hybrid.") },
344
        { "timeScaleParams",              N_("Time Scale Parameters"),            "timeScaleStretch",      xmpText, xmpInternal, N_("Additional parameters for Time-Scale stretch mode.") },
345
        { "resampleParams",               N_("Resample Parameters"),              "resampleStretch",       xmpText, xmpInternal, N_("Additional parameters for Resample stretch mode.") },
346
        { "beatSpliceParams",             N_("Beat Splice Parameters"),           "beatSpliceStretch",     xmpText, xmpInternal, N_("Additional parameters for Beat Splice stretch mode.") },
347
        { "timeSignature",                N_("Time Signature"),                   "closed Choice of Text", xmpText, xmpInternal, N_("The time signature of the music. One of: 2/4, 3/4, 4/4, 5/4, 7/4, 6/8, 9/8, 12/8, other.") },
348
        { "scaleType",                    N_("Scale Type"),                       "closed Choice of Text", xmpText, xmpInternal, N_("The musical scale used in the music. One of: Major, Minor, Both, Neither. "
349
                                                                                                                                    "Neither is most often used for instruments with no associated scale, such as drums.") },
350
        // End of list marker
351
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
352
    };
353

    
354
    extern const XmpPropertyInfo xmpMicrosoftInfo[] = {
355
        { "CameraSerialNumber", N_("Camera Serial Number"), "Text",     xmpText, xmpExternal, N_("Camera Serial Number.") },
356
        { "DateAcquired",       N_("Date Acquired"),        "Date",     xmpText, xmpExternal, N_("Date Acquired.")        },
357
        { "FlashManufacturer",  N_("Flash Manufacturer"),   "Text",     xmpText, xmpExternal, N_("Flash Manufacturer.")   },
358
        { "FlashModel",         N_("Flash Model"),          "Text",     xmpText, xmpExternal, N_("Flash Model.")          },
359
        { "LastKeywordIPTC",    N_("Last Keyword IPTC"),    "bag Text", xmpBag,  xmpExternal, N_("Last Keyword IPTC.")    },
360
        { "LastKeywordXMP",     N_("Last Keyword XMP"),     "bag Text", xmpBag,  xmpExternal, N_("Last Keyword XMP.")     },
361
        { "LensManufacturer",   N_("Lens Manufacturer"),    "Text",     xmpText, xmpExternal, N_("Lens Manufacturer.")    },
362
        { "LensModel",          N_("Lens Model"),           "Text",     xmpText, xmpExternal, N_("Lens Model.")           },
363
        { "Rating",             N_("Rating Percent"),       "Text",     xmpText, xmpExternal, N_("Rating Percent.")       },
364
        // End of list marker
365
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
366
    };
367

    
368
    extern const XmpPropertyInfo xmpPdfInfo[] = {
369
        { "Keywords",   N_("Keywords"),    "Text",      xmpText, xmpExternal, N_("Keywords.") },
370
        { "PDFVersion", N_("PDF Version"), "Text",      xmpText, xmpInternal, N_("The PDF file version (for example: 1.0, 1.3, and so on).") },
371
        { "Producer",   N_("Producer"),    "AgentName", xmpText, xmpInternal, N_("The name of the tool that created the PDF document.") },
372
        // End of list marker
373
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
374
    };
375

    
376
    extern const XmpPropertyInfo xmpPhotoshopInfo[] = {
377
        { "AuthorsPosition",        N_("Authors Position"),        "Text",       xmpText, xmpExternal, N_("By-line title.") },
378
        { "CaptionWriter",          N_("Caption Writer"),          "ProperName", xmpText, xmpExternal, N_("Writer/editor.") },
379
        { "Category",               N_("Category"),                "Text",       xmpText, xmpExternal, N_("Category. Limited to 3 7-bit ASCII characters.") },
380
        { "City",                   N_("City"),                    "Text",       xmpText, xmpExternal, N_("City.") },
381
        { "Country",                N_("Country"),                 "Text",       xmpText, xmpExternal, N_("Country/primary location.") },
382
        { "Credit",                 N_("Credit"),                  "Text",       xmpText, xmpExternal, N_("Credit.") },
383
        { "DateCreated",            N_("Date Created"),            "Date",       xmpText, xmpExternal, N_("The date the intellectual content of the document was created (rather than the creation "
384
                                                                                                          "date of the physical representation), following IIM conventions. For example, a photo "
385
                                                                                                          "taken during the American Civil War would have a creation date during that epoch "
386
                                                                                                          "(1861-1865) rather than the date the photo was digitized for archiving.") },
387
        { "Headline",               N_("Headline"),                "Text",       xmpText, xmpExternal, N_("Headline.") },
388
        { "Instructions",           N_("Instructions"),            "Text",       xmpText, xmpExternal, N_("Special instructions.") },
389
        { "Source",                 N_("Source"),                  "Text",       xmpText, xmpExternal, N_("Source.") },
390
        { "State",                  N_("State"),                   "Text",       xmpText, xmpExternal, N_("Province/state.") },
391
        { "SupplementalCategories", N_("Supplemental Categories"), "bag Text",   xmpBag,  xmpExternal, N_("Supplemental category.") },
392
        { "TransmissionReference",  N_("Transmission Reference"),  "Text",       xmpText, xmpExternal, N_("Original transmission reference.") },
393
        { "Urgency",                N_("Urgency"),                 "Integer",    xmpText, xmpExternal, N_("Urgency. Valid range is 1-8.") },
394
        // End of list marker
395
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
396
    };
397

    
398
    //! XMP crs:CropUnits
399
    extern const TagDetails crsCropUnits[] = {
400
        { 0, N_("pixels") },
401
        { 1, N_("inches") },
402
        { 2, N_("cm")     }
403
    };
404

    
405
    extern const XmpPropertyInfo xmpCrsInfo[] = {
406
        { "AutoBrightness",       N_("Auto Brightness"),           "Boolean",                          xmpText, xmpExternal, N_("When true, \"Brightness\" is automatically adjusted.") },
407
        { "AutoContrast",         N_("Auto Contrast"),             "Boolean",                          xmpText, xmpExternal, N_("When true, \"Contrast\" is automatically adjusted.") },
408
        { "AutoExposure",         N_("Auto Exposure"),             "Boolean",                          xmpText, xmpExternal, N_("When true, \"Exposure\" is automatically adjusted.") },
409
        { "AutoShadows",          N_("Auto Shadows"),              "Boolean",                          xmpText, xmpExternal, N_("When true,\"Shadows\" is automatically adjusted.") },
410
        { "BlueHue",              N_("Blue Hue"),                  "Integer",                          xmpText, xmpExternal, N_("\"Blue Hue\" setting. Range -100 to 100.") },
411
        { "BlueSaturation",       N_("Blue Saturation"),           "Integer",                          xmpText, xmpExternal, N_("\"Blue Saturation\" setting. Range -100 to +100.") },
412
        { "Brightness",           N_("Brightness"),                "Integer",                          xmpText, xmpExternal, N_("\"Brightness\" setting. Range 0 to +150.") },
413
        { "CameraProfile",        N_("Camera Profile"),            "Text",                             xmpText, xmpExternal, N_("\"Camera Profile\" setting.") },
414
        { "ChromaticAberrationB", N_("Chromatic Aberration Blue"), "Integer",                          xmpText, xmpExternal, N_("\"Chromatic Aberration, Fix Blue/Yellow Fringe\" setting. Range -100 to +100.") },
415
        { "ChromaticAberrationR", N_("Chromatic Aberration Red"),  "Integer",                          xmpText, xmpExternal, N_("\"Chromatic Aberration, Fix Red/Cyan Fringe\" setting. Range -100 to +100.") },
416
        { "ColorNoiseReduction",  N_("Color Noise Reduction"),     "Integer",                          xmpText, xmpExternal, N_("\"Color Noise Reducton\" setting. Range 0 to +100.") },
417
        { "Contrast",             N_("Contrast"),                  "Integer",                          xmpText, xmpExternal, N_("\"Contrast\" setting. Range -50 to +100.") },
418
        { "CropTop",              N_("Crop Top"),                  "Real",                             xmpText, xmpExternal, N_("When \"Has Crop\" is true, top of crop rectangle") },
419
        { "CropLeft",             N_("Crop Left"),                 "Real",                             xmpText, xmpExternal, N_("When \"Has Crop\" is true, left of crop rectangle.") },
420
        { "CropBottom",           N_("Crop Bottom"),               "Real",                             xmpText, xmpExternal, N_("When \"Has Crop\" is true, bottom of crop rectangle.") },
421
        { "CropRight",            N_("Crop Right"),                "Real",                             xmpText, xmpExternal, N_("When \"Has Crop\" is true, right of crop rectangle.") },
422
        { "CropAngle",            N_("Crop Angle"),                "Real",                             xmpText, xmpExternal, N_("When \"Has Crop\" is true, angle of crop rectangle.") },
423
        { "CropWidth",            N_("Crop Width"),                "Real",                             xmpText, xmpExternal, N_("Width of resulting cropped image in CropUnits units.") },
424
        { "CropHeight",           N_("Crop Height"),               "Real",                             xmpText, xmpExternal, N_("Height of resulting cropped image in CropUnits units.") },
425
        { "CropUnits",            N_("Crop Units"),                "Integer",                          xmpText, xmpExternal, N_("Units for CropWidth and CropHeight. 0=pixels, 1=inches, 2=cm") },
426
        { "Exposure",             N_("Exposure"),                  "Real",                             xmpText, xmpExternal, N_("\"Exposure\" setting. Range -4.0 to +4.0.") },
427
        { "GreenHue",             N_("GreenHue"),                  "Integer",                          xmpText, xmpExternal, N_("\"Green Hue\" setting. Range -100 to +100.") },
428
        { "GreenSaturation",      N_("Green Saturation"),          "Integer",                          xmpText, xmpExternal, N_("\"Green Saturation\" setting. Range -100 to +100.") },
429
        { "HasCrop",              N_("Has Crop"),                  "Boolean",                          xmpText, xmpExternal, N_("When true, image has a cropping rectangle.") },
430
        { "HasSettings",          N_("Has Settings"),              "Boolean",                          xmpText, xmpExternal, N_("When true, non-default camera raw settings.") },
431
        { "LuminanceSmoothing",   N_("Luminance Smoothing"),       "Integer",                          xmpText, xmpExternal, N_("\"Luminance Smoothing\" setting. Range 0 to +100.") },
432
        { "RawFileName",          N_("Raw File Name"),             "Text",                             xmpText, xmpInternal, N_("File name of raw file (not a complete path).") },
433
        { "RedHue",               N_("Red Hue"),                   "Integer",                          xmpText, xmpExternal, N_("\"Red Hue\" setting. Range -100 to +100.") },
434
        { "RedSaturation",        N_("Red Saturation"),            "Integer",                          xmpText, xmpExternal, N_("\"Red Saturation\" setting. Range -100 to +100.") },
435
        { "Saturation",           N_("Saturation"),                "Integer",                          xmpText, xmpExternal, N_("\"Saturation\" setting. Range -100 to +100.") },
436
        { "Shadows",              N_("Shadows"),                   "Integer",                          xmpText, xmpExternal, N_("\"Shadows\" setting. Range 0 to +100.") },
437
        { "ShadowTint",           N_("Shadow Tint"),               "Integer",                          xmpText, xmpExternal, N_("\"Shadow Tint\" setting. Range -100 to +100.") },
438
        { "Sharpness",            N_("Sharpness"),                 "Integer",                          xmpText, xmpExternal, N_("\"Sharpness\" setting. Range 0 to +100.") },
439
        { "Temperature",          N_("Temperature"),               "Integer",                          xmpText, xmpExternal, N_("\"Temperature\" setting. Range 2000 to 50000.") },
440
        { "Tint",                 N_("Tint"),                      "Integer",                          xmpText, xmpExternal, N_("\"Tint\" setting. Range -150 to +150.") },
441
        { "ToneCurve",            N_("Tone Curve"),                "Seq of points (Integer, Integer)", xmpText, xmpExternal, N_("Array of points (Integer, Integer) defining a \"Tone Curve\".") },
442
        { "ToneCurveName",        N_("Tone Curve Name"),           "Choice Text",                      xmpText, xmpInternal, N_("The name of the Tone Curve described by ToneCurve. One of: Linear, Medium Contrast, "
443
                                                                                                                                "Strong Contrast, Custom or a user-defined preset name.") },
444
        { "Version",              N_("Version"),                   "Text",                             xmpText, xmpInternal, N_("Version of Camera Raw plugin.") },
445
        { "VignetteAmount",       N_("Vignette Amount"),           "Integer",                          xmpText, xmpExternal, N_("\"Vignetting Amount\" setting. Range -100 to +100.") },
446
        { "VignetteMidpoint",     N_("Vignette Midpoint"),         "Integer",                          xmpText, xmpExternal, N_("\"Vignetting Midpoint\" setting. Range 0 to +100.") },
447
        { "WhiteBalance",         N_("White Balance"),             "Closed Choice Text",               xmpText, xmpExternal, N_("\"White Balance\" setting. One of: As Shot, Auto, Daylight, Cloudy, Shade, Tungsten, "
448
                                                                                                                                "Fluorescent, Flash, Custom") },
449
        // End of list marker
450
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
451
    };
452

    
453
    extern const XmpPropertyInfo xmpTiffInfo[] = {
454
        { "ImageWidth",                N_("Image Width"),                "Integer",                      xmpText, xmpInternal, N_("TIFF tag 256, 0x100. Image width in pixels.") },
455
        { "ImageLength",               N_("Image Length"),               "Integer",                      xmpText, xmpInternal, N_("TIFF tag 257, 0x101. Image height in pixels.") },
456
        { "BitsPerSample",             N_("Bits Per Sample"),            "seq Integer",                  xmpSeq,  xmpInternal, N_("TIFF tag 258, 0x102. Number of bits per component in each channel.") },
457
        { "Compression",               N_("Compression"),                "Closed Choice of Integer",     xmpText, xmpInternal, N_("TIFF tag 259, 0x103. Compression scheme: 1 = uncompressed; 6 = JPEG.") },
458
        { "PhotometricInterpretation", N_("Photometric Interpretation"), "Closed Choice of Integer",     xmpText, xmpInternal, N_("TIFF tag 262, 0x106. Pixel Composition: 2 = RGB; 6 = YCbCr.") },
459
        { "Orientation",               N_("Orientation"),                "Closed Choice of Integer",     xmpText, xmpInternal, N_("TIFF tag 274, 0x112. Orientation:"
460
                                                                                                                                  "1 = 0th row at top, 0th column at left "
461
                                                                                                                                  "2 = 0th row at top, 0th column at right "
462
                                                                                                                                  "3 = 0th row at bottom, 0th column at right "
463
                                                                                                                                  "4 = 0th row at bottom, 0th column at left "
464
                                                                                                                                  "5 = 0th row at left, 0th column at top "
465
                                                                                                                                  "6 = 0th row at right, 0th column at top "
466
                                                                                                                                  "7 = 0th row at right, 0th column at bottom "
467
                                                                                                                                  "8 = 0th row at left, 0th column at bottom") },
468
        { "SamplesPerPixel",           N_("Samples Per Pixel"),          "Integer",                      xmpText, xmpInternal, N_("TIFF tag 277, 0x115. Number of components per pixel.") },
469
        { "PlanarConfiguration",       N_("Planar Configuration"),       "Closed Choice of Integer",     xmpText, xmpInternal, N_("TIFF tag 284, 0x11C. Data layout:1 = chunky; 2 = planar.") },
470
        { "YCbCrSubSampling",          N_("YCbCr Sub Sampling"),         "Closed Choice of seq Integer", xmpSeq,  xmpInternal, N_("TIFF tag 530, 0x212. Sampling ratio of chrominance "
471
                                                                                                                                  "components: [2, 1] = YCbCr4:2:2; [2, 2] = YCbCr4:2:0") },
472
        { "YCbCrPositioning",          N_("YCbCr Positioning"),          "Closed Choice of Integer",     xmpText, xmpInternal, N_("TIFF tag 531, 0x213. Position of chrominance vs. "
473
                                                                                                                                  "luminance components: 1 = centered; 2 = co-sited.") },
474
        { "XResolution",               N_("X Resolution"),               "Rational",                     xmpText, xmpInternal, N_("TIFF tag 282, 0x11A. Horizontal resolution in pixels per unit.") },
475
        { "YResolution",               N_("Y Resolution"),               "Rational",                     xmpText, xmpInternal, N_("TIFF tag 283, 0x11B. Vertical resolution in pixels per unit.") },
476
        { "ResolutionUnit",            N_("Resolution Unit"),            "Closed Choice of Integer",     xmpText, xmpInternal, N_("TIFF tag 296, 0x128. Unit used for XResolution and "
477
                                                                                                                                  "YResolution. Value is one of: 2 = inches; 3 = centimeters.") },
478
        { "TransferFunction",          N_("Transfer Function"),          "seq Integer",                  xmpSeq,  xmpInternal, N_("TIFF tag 301, 0x12D. Transfer function for image "
479
                                                                                                                                  "described in tabular style with 3 * 256 entries.") },
480
        { "WhitePoint",                N_("White Point"),                "seq Rational",                 xmpSeq,  xmpInternal, N_("TIFF tag 318, 0x13E. Chromaticity of white point.") },
481
        { "PrimaryChromaticities",     N_("Primary Chromaticities"),     "seq Rational",                 xmpSeq,  xmpInternal, N_("TIFF tag 319, 0x13F. Chromaticity of the three primary colors.") },
482
        { "YCbCrCoefficients",         N_("YCbCr Coefficients"),         "seq Rational",                 xmpSeq,  xmpInternal, N_("TIFF tag 529, 0x211. Matrix coefficients for RGB to YCbCr transformation.") },
483
        { "ReferenceBlackWhite",       N_("Reference Black White"),      "seq Rational",                 xmpSeq,  xmpInternal, N_("TIFF tag 532, 0x214. Reference black and white point values.") },
484
        { "DateTime",                  N_("Date and Time"),              "Date",                         xmpText, xmpInternal, N_("TIFF tag 306, 0x132 (primary) and EXIF tag 37520, "
485
                                                                                                                                  "0x9290 (subseconds). Date and time of image creation "
486
                                                                                                                                  "(no time zone in EXIF), stored in ISO 8601 format, not "
487
                                                                                                                                  "the original EXIF format. This property includes the "
488
                                                                                                                                  "value for the EXIF SubSecTime attribute. "
489
                                                                                                                                  "NOTE: This property is stored in XMP as xmp:ModifyDate.") },
490
        { "ImageDescription",          N_("Image Description"),          "Lang Alt",                     langAlt, xmpExternal, N_("TIFF tag 270, 0x10E. Description of the image. Note: This property is stored in XMP as dc:description.") },
491
        { "Make",                      N_("Make"),                       "ProperName",                   xmpText, xmpInternal, N_("TIFF tag 271, 0x10F. Manufacturer of recording equipment.") },
492
        { "Model",                     N_("Model"),                      "ProperName",                   xmpText, xmpInternal, N_("TIFF tag 272, 0x110. Model name or number of equipment.") },
493
        { "Software",                  N_("Software"),                   "AgentName",                    xmpText, xmpInternal, N_("TIFF tag 305, 0x131. Software or firmware used to generate image. "
494
                                                                                                                                  "Note: This property is stored in XMP as xmp:CreatorTool. ") },
495
        { "Artist",                    N_("Artist"),                     "ProperName",                   xmpText, xmpExternal, N_("TIFF tag 315, 0x13B. Camera owner, photographer or image creator. "
496
                                                                                                                                  "Note: This property is stored in XMP as the first item in the dc:creator array.") },
497
        { "Copyright",                 N_("Copyright"),                  "Lang Alt",                     langAlt, xmpExternal, N_("TIFF tag 33432, 0x8298. Copyright information. "
498
                                                                                                                                  "Note: This property is stored in XMP as dc:rights.") },
499
        // End of list marker
500
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
501
    };
502

    
503
    extern const XmpPropertyInfo xmpExifInfo[] = {
504
        { "ExifVersion",              N_("Exif Version"),                        "Closed Choice of Text",        xmpText, xmpInternal, N_("EXIF tag 36864, 0x9000. EXIF version number.") },
505
        { "FlashpixVersion",          N_("Flashpix Version"),                    "Closed Choice of Text",        xmpText, xmpInternal, N_("EXIF tag 40960, 0xA000. Version of FlashPix.") },
506
        { "ColorSpace",               N_("Color Space"),                         "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 40961, 0xA001. Color space information") },
507
        { "ComponentsConfiguration",  N_("Components Configuration"),            "Closed Choice of seq Integer", xmpSeq,  xmpInternal, N_("EXIF tag 37121, 0x9101. Configuration of components in data: 4 5 6 0 (if RGB compressed data), "
508
                                                                                                                                          "1 2 3 0 (other cases).") },
509
        { "CompressedBitsPerPixel",   N_("Compressed Bits Per Pixel"),           "Rational",                     xmpText, xmpInternal, N_("EXIF tag 37122, 0x9102. Compression mode used for a compressed image is indicated "
510
                                                                                                                                          "in unit bits per pixel.") },
511
        { "PixelXDimension",          N_("Pixel X Dimension"),                   "Integer",                      xmpText, xmpInternal, N_("EXIF tag 40962, 0xA002. Valid image width, in pixels.") },
512
        { "PixelYDimension",          N_("Pixel Y Dimension"),                   "Integer",                      xmpText, xmpInternal, N_("EXIF tag 40963, 0xA003. Valid image height, in pixels.") },
513
        { "UserComment",              N_("User Comment"),                        "Lang Alt",                     langAlt, xmpExternal, N_("EXIF tag 37510, 0x9286. Comments from user.") },
514
        { "RelatedSoundFile",         N_("Related Sound File"),                  "Text",                         xmpText, xmpInternal, N_("EXIF tag 40964, 0xA004. An \"8.3\" file name for the related sound file.") },
515
        { "DateTimeOriginal",         N_("Date and Time Original"),              "Date",                         xmpText, xmpInternal, N_("EXIF tags 36867, 0x9003 (primary) and 37521, 0x9291 (subseconds). "
516
                                                                                                                                          "Date and time when original image was generated, in ISO 8601 format. "
517
                                                                                                                                          "Includes the EXIF SubSecTimeOriginal data.") },
518
        { "DateTimeDigitized",        N_("Date and Time Digitized"),             "Date",                         xmpText, xmpInternal, N_("EXIF tag 36868, 0x9004 (primary) and 37522, 0x9292 (subseconds). Date and time when "
519
                                                                                                                                          "image was stored as digital data, can be the same as DateTimeOriginal if originally "
520
                                                                                                                                          "stored in digital form. Stored in ISO 8601 format. Includes the EXIF "
521
                                                                                                                                          "SubSecTimeDigitized data.") },
522
        { "ExposureTime",             N_("Exposure Time"),                       "Rational",                     xmpText, xmpInternal, N_("EXIF tag 33434, 0x829A. Exposure time in seconds.") },
523
        { "FNumber",                  N_("F Number"),                            "Rational",                     xmpText, xmpInternal, N_("EXIF tag 33437, 0x829D. F number.") },
524
        { "ExposureProgram",          N_("Exposure Program"),                    "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 34850, 0x8822. Class of program used for exposure.") },
525
        { "SpectralSensitivity",      N_("Spectral Sensitivity"),                "Text",                         xmpText, xmpInternal, N_("EXIF tag 34852, 0x8824. Spectral sensitivity of each channel.") },
526
        { "ISOSpeedRatings",          N_("ISOSpeedRatings"),                     "seq Integer",                  xmpSeq,  xmpInternal, N_("EXIF tag 34855, 0x8827. ISO Speed and ISO Latitude of the input device as "
527
                                                                                                                                          "specified in ISO 12232.") },
528
        { "OECF",                     N_("OECF"),                                "OECF/SFR",                     xmpText, xmpInternal, N_("EXIF tag 34856, 0x8828. Opto-Electoric Conversion Function as specified in ISO 14524.") },
529
        { "ShutterSpeedValue",        N_("Shutter Speed Value"),                 "Rational",                     xmpText, xmpInternal, N_("EXIF tag 37377, 0x9201. Shutter speed, unit is APEX. See Annex C of the EXIF specification.") },
530
        { "ApertureValue",            N_("Aperture Value"),                      "Rational",                     xmpText, xmpInternal, N_("EXIF tag 37378, 0x9202. Lens aperture, unit is APEX.") },
531
        { "BrightnessValue",          N_("Brightness Value"),                    "Rational",                     xmpText, xmpInternal, N_("EXIF tag 37379, 0x9203. Brightness, unit is APEX.") },
532
        { "ExposureBiasValue",        N_("Exposure Bias Value"),                 "Rational",                     xmpText, xmpInternal, N_("EXIF tag 37380, 0x9204. Exposure bias, unit is APEX.") },
533
        { "MaxApertureValue",         N_("Maximum Aperture Value"),              "Rational",                     xmpText, xmpInternal, N_("EXIF tag 37381, 0x9205. Smallest F number of lens, in APEX.") },
534
        { "SubjectDistance",          N_("Subject Distance"),                    "Rational",                     xmpText, xmpInternal, N_("EXIF tag 37382, 0x9206. Distance to subject, in meters.") },
535
        { "MeteringMode",             N_("Metering Mode"),                       "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 37383, 0x9207. Metering mode.") },
536
        { "LightSource",              N_("Light Source"),                        "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 37384, 0x9208. Light source.") },
537
        { "Flash",                    N_("Flash"),                               "Flash",                        xmpText, xmpInternal, N_("EXIF tag 37385, 0x9209. Strobe light (flash) source data.") },
538
        { "FocalLength",              N_("Focal Length"),                        "Rational",                     xmpText, xmpInternal, N_("EXIF tag 37386, 0x920A. Focal length of the lens, in millimeters.") },
539
        { "SubjectArea",              N_("Subject Area"),                        "seq Integer",                  xmpSeq,  xmpInternal, N_("EXIF tag 37396, 0x9214. The location and area of the main subject in the overall scene.") },
540
        { "FlashEnergy",              N_("Flash Energy"),                        "Rational",                     xmpText, xmpInternal, N_("EXIF tag 41483, 0xA20B. Strobe energy during image capture.") },
541
        { "SpatialFrequencyResponse", N_("Spatial Frequency Response"),          "OECF/SFR",                     xmpText, xmpInternal, N_("EXIF tag 41484, 0xA20C. Input device spatial frequency table and SFR values as "
542
                                                                                                                                          "specified in ISO 12233.") },
543
        { "FocalPlaneXResolution",    N_("Focal Plane X Resolution"),            "Rational",                     xmpText, xmpInternal, N_("EXIF tag 41486, 0xA20E. Horizontal focal resolution, measured pixels per unit.") },
544
        { "FocalPlaneYResolution",    N_("Focal Plane Y Resolution"),            "Rational",                     xmpText, xmpInternal, N_("EXIF tag 41487, 0xA20F. Vertical focal resolution, measured in pixels per unit.") },
545
        { "FocalPlaneResolutionUnit", N_("Focal Plane Resolution Unit"),         "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41488, 0xA210. Unit used for FocalPlaneXResolution and FocalPlaneYResolution.") },
546
        { "SubjectLocation",          N_("Subject Location"),                    "seq Integer",                  xmpSeq,  xmpInternal, N_("EXIF tag 41492, 0xA214. Location of the main subject of the scene. The first value is the "
547
                                                                                                                                          "horizontal pixel and the second value is the vertical pixel at which the "
548
                                                                                                                                          "main subject appears.") },
549
        { "ExposureIndex",            N_("Exposure Index"),                      "Rational",                     xmpText, xmpInternal, N_("EXIF tag 41493, 0xA215. Exposure index of input device.") },
550
        { "SensingMethod",            N_("Sensing Method"),                      "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41495, 0xA217. Image sensor type on input device.") },
551
        { "FileSource",               N_("File Source"),                         "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41728, 0xA300. Indicates image source.") },
552
        { "SceneType",                N_("Scene Type"),                          "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41729, 0xA301. Indicates the type of scene.") },
553
        { "CFAPattern",               N_("CFA Pattern"),                         "CFAPattern",                   xmpText, xmpInternal, N_("EXIF tag 41730, 0xA302. Color filter array geometric pattern of the image sense.") },
554
        { "CustomRendered",           N_("Custom Rendered"),                     "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41985, 0xA401. Indicates the use of special processing on image data.") },
555
        { "ExposureMode",             N_("Exposure Mode"),                       "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41986, 0xA402. Indicates the exposure mode set when the image was shot.") },
556
        { "WhiteBalance",             N_("White Balance"),                       "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41987, 0xA403. Indicates the white balance mode set when the image was shot.") },
557
        { "DigitalZoomRatio",         N_("Digital Zoom Ratio"),                  "Rational",                     xmpText, xmpInternal, N_("EXIF tag 41988, 0xA404. Indicates the digital zoom ratio when the image was shot.") },
558
        { "FocalLengthIn35mmFilm",    N_("Focal Length In 35mm Film"),           "Integer",                      xmpText, xmpInternal, N_("EXIF tag 41989, 0xA405. Indicates the equivalent focal length assuming a 35mm film "
559
                                                                                                                                          "camera, in mm. A value of 0 means the focal length is unknown. Note that this tag "
560
                                                                                                                                          "differs from the FocalLength tag.") },
561
        { "SceneCaptureType",         N_("Scene Capture Type"),                  "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41990, 0xA406. Indicates the type of scene that was shot.") },
562
        { "GainControl",              N_("Gain Control"),                        "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41991, 0xA407. Indicates the degree of overall image gain adjustment.") },
563
        { "Contrast",                 N_("Contrast"),                            "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41992, 0xA408. Indicates the direction of contrast processing applied by the camera.") },
564
        { "Saturation",               N_("Saturation"),                          "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41993, 0xA409. Indicates the direction of saturation processing applied by the camera.") },
565
        { "Sharpness",                N_("Sharpness"),                           "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41994, 0xA40A. Indicates the direction of sharpness processing applied by the camera.") },
566
        { "DeviceSettingDescription", N_("Device Setting Description"),          "DeviceSettings",               xmpText, xmpInternal, N_("EXIF tag 41995, 0xA40B. Indicates information on the picture-taking conditions of a particular camera model.") },
567
        { "SubjectDistanceRange",     N_("Subject Distance Range"),              "Closed Choice of Integer",     xmpText, xmpInternal, N_("EXIF tag 41996, 0xA40C. Indicates the distance to the subject.") },
568
        { "ImageUniqueID",            N_("Image Unique ID"),                     "Text",                         xmpText, xmpInternal, N_("EXIF tag 42016, 0xA420. An identifier assigned uniquely to each image. It is recorded as a 32 "
569
                                                                                                                                          "character ASCII string, equivalent to hexadecimal notation and 128-bit fixed length.") },
570
        { "GPSVersionID",             N_("GPS Version ID"),                      "Text",                         xmpText, xmpInternal, N_("GPS tag 0, 0x00. A decimal encoding of each of the four EXIF bytes with period separators. "
571
                                                                                                                                          "The current value is \"2.0.0.0\".") },
572
        { "GPSLatitude",              N_("GPS Latitude"),                        "GPSCoordinate",                xmpText, xmpInternal, N_("GPS tag 2, 0x02 (position) and 1, 0x01 (North/South). Indicates latitude.") },
573
        { "GPSLongitude",             N_("GPS Longitude"),                       "GPSCoordinate",                xmpText, xmpInternal, N_("GPS tag 4, 0x04 (position) and 3, 0x03 (East/West). Indicates longitude.") },
574
        { "GPSAltitudeRef",           N_("GPS Altitude Reference"),              "Closed Choice of Integer",     xmpText, xmpInternal, N_("GPS tag 5, 0x05. Indicates whether the altitude is above or below sea level.") },
575
        { "GPSAltitude",              N_("GPS Altitude"),                        "Rational",                     xmpText, xmpInternal, N_("GPS tag 6, 0x06. Indicates altitude in meters.") },
576
        { "GPSTimeStamp",             N_("GPS Time Stamp"),                      "Date",                         xmpText, xmpInternal, N_("GPS tag 29 (date), 0x1D, and, and GPS tag 7 (time), 0x07. Time stamp of GPS data, "
577
                                                                                                                                          "in Coordinated Universal Time. Note: The GPSDateStamp tag is new in EXIF 2.2. "
578
                                                                                                                                          "The GPS timestamp in EXIF 2.1 does not include a date. If not present, "
579
                                                                                                                                          "the date component for the XMP should be taken from exif:DateTimeOriginal, or if that is "
580
                                                                                                                                          "also lacking from exif:DateTimeDigitized. If no date is available, do not write "
581
                                                                                                                                          "exif:GPSTimeStamp to XMP.") },
582
        { "GPSSatellites",            N_("GPS Satellites"),                      "Text",                         xmpText, xmpInternal, N_("GPS tag 8, 0x08. Satellite information, format is unspecified.") },
583
        { "GPSStatus",                N_("GPS Status"),                          "Closed Choice of Text",        xmpText, xmpInternal, N_("GPS tag 9, 0x09. Status of GPS receiver at image creation time.") },
584
        { "GPSMeasureMode",           N_("GPS Measure Mode"),                    "Text",                         xmpText, xmpInternal, N_("GPS tag 10, 0x0A. GPS measurement mode, Text type.") },
585
        { "GPSDOP",                   N_("GPS DOP"),                             "Rational",                     xmpText, xmpInternal, N_("GPS tag 11, 0x0B. Degree of precision for GPS data.") },
586
        { "GPSSpeedRef",              N_("GPS Speed Reference"),                 "Closed Choice of Text",        xmpText, xmpInternal, N_("GPS tag 12, 0x0C. Units used to speed measurement.") },
587
        { "GPSSpeed",                 N_("GPS Speed"),                           "Rational",                     xmpText, xmpInternal, N_("GPS tag 13, 0x0D. Speed of GPS receiver movement.") },
588
        { "GPSTrackRef",              N_("GPS Track Reference"),                 "Closed Choice of Text",        xmpText, xmpInternal, N_("GPS tag 14, 0x0E. Reference for movement direction.") },
589
        { "GPSTrack",                 N_("GPS Track"),                           "Rational",                     xmpText, xmpInternal, N_("GPS tag 15, 0x0F. Direction of GPS movement, values range from 0 to 359.99.") },
590
        { "GPSImgDirectionRef",       N_("GPS Image Direction Reference"),       "Closed Choice of Text",        xmpText, xmpInternal, N_("GPS tag 16, 0x10. Reference for image direction.") },
591
        { "GPSImgDirection",          N_("GPS Image Direction"),                 "Rational",                     xmpText, xmpInternal, N_("GPS tag 17, 0x11. Direction of image when captured, values range from 0 to 359.99.") },
592
        { "GPSMapDatum",              N_("GPS Map Datum"),                       "Text",                         xmpText, xmpInternal, N_("GPS tag 18, 0x12. Geodetic survey data.") },
593
        { "GPSDestLatitude",          N_("GPS Destination Latitude"),            "GPSCoordinate",                xmpText, xmpInternal, N_("GPS tag 20, 0x14 (position) and 19, 0x13 (North/South). Indicates destination latitude.") },
594
        { "GPSDestLongitude",         N_("GPS Destination Longitude"),           "GPSCoordinate",                xmpText, xmpInternal, N_("GPS tag 22, 0x16 (position) and 21, 0x15 (East/West). Indicates destination longitude.") },
595
        { "GPSDestBearingRef",        N_("GPS Destination Bearing Reference"),   "Closed Choice of Text",        xmpText, xmpInternal, N_("GPS tag 23, 0x17. Reference for movement direction.") },
596
        { "GPSDestBearing",           N_("GPS Destination Bearing"),             "Rational",                     xmpText, xmpInternal, N_("GPS tag 24, 0x18. Destination bearing, values from 0 to 359.99.") },
597
        { "GPSDestDistanceRef",       N_("GPS Destination Distance Refefrence"), "Closed Choice  of Text",       xmpText, xmpInternal, N_("GPS tag 25, 0x19. Units used for speed measurement.") },
598
        { "GPSDestDistance",          N_("GPS Destination Distance"),            "Rational",                     xmpText, xmpInternal, N_("GPS tag 26, 0x1A. Distance to destination.") },
599
        { "GPSProcessingMethod",      N_("GPS Processing Method"),               "Text",                         xmpText, xmpInternal, N_("GPS tag 27, 0x1B. A character string recording the name of the method used for location finding.") },
600
        { "GPSAreaInformation",       N_("GPS Area Information"),                "Text",                         xmpText, xmpInternal, N_("GPS tag 28, 0x1C. A character string recording the name of the GPS area.") },
601
        { "GPSDifferential",          N_("GPS Differential"),                    "Closed Choice of Integer",     xmpText, xmpInternal, N_("GPS tag 30, 0x1E. Indicates whether differential correction is applied to the GPS receiver.") },
602
        // End of list marker
603
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
604
    };
605

    
606
    extern const XmpPropertyInfo xmpAuxInfo[] = {
607
        { "Lens",             N_("Lens"),             "Text",        xmpText,          xmpInternal, N_("A description of the lens used to take the photograph. For example, \"70-200 mm f/2.8-4.0\".") },
608
        { "SerialNumber",     N_("SerialNumber"),     "Text",        xmpText,          xmpInternal, N_("The serial number of the camera or camera body used to take the photograph.") },
609
        // End of list marker
610
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
611
    };
612

    
613
    extern const XmpPropertyInfo xmpIptcInfo[] = {
614
        { "CiAdrCity",          N_("Contact Info-City"),           "Text",                      xmpText, xmpExternal, N_("The contact information city part.") },
615
        { "CiAdrCtry",          N_("Contact Info-Country"),        "Text",                      xmpText, xmpExternal, N_("The contact information country part.") },
616
        { "CiAdrExtadr",        N_("Contact Info-Address"),        "Text",                      xmpText, xmpExternal, N_("The contact information address part. Comprises an optional company name and all required "
617
                                                                                                                         "information to locate the building or postbox to which mail should be sent.") },
618
        { "CiAdrPcode",         N_("Contact Info-Postal Code"),    "Text",                      xmpText, xmpExternal, N_("The contact information part denoting the local postal code.") },
619
        { "CiAdrRegion",        N_("Contact Info-State/Province"), "Text",                      xmpText, xmpExternal, N_("The contact information part denoting regional information like state or province.") },
620
        { "CiEmailWork",        N_("Contact Info-Email"),          "Text",                      xmpText, xmpExternal, N_("The contact information email address part.") },
621
        { "CiTelWork",          N_("Contact Info-Phone"),          "Text",                      xmpText, xmpExternal, N_("The contact information phone number part.") },
622
        { "CiUrlWork",          N_("Contact Info-Web URL"),        "Text",                      xmpText, xmpExternal, N_("The contact information web address part.") },
623
        { "CountryCode",        N_("Country Code"),                "closed Choice of Text",     xmpText, xmpExternal, N_("Code of the country the content is focussing on -- either the country shown in visual "
624
                                                                                                                         "media or referenced in text or audio media. This element is at the top/first level of "
625
                                                                                                                         "a top-down geographical hierarchy. The code should be taken from ISO 3166 two or three "
626
                                                                                                                         "letter code. The full name of a country should go to the \"Country\" element.") },
627
        { "CreatorContactInfo", N_("Creator's Contact Info"),      "ContactInfo",               xmpText, xmpExternal, N_("The creator's contact information provides all necessary information to get in contact "
628
                                                                                                                         "with the creator of this news object and comprises a set of sub-properties for proper addressing.") },
629
        { "IntellectualGenre",  N_("Intellectual Genre"),          "Text",                      xmpText, xmpExternal, N_("Describes the nature, intellectual or journalistic characteristic of a news object, not "
630
                                                                                                                         "specifically its content.") },
631
        { "Location",           N_("Location"),                    "Text",                      xmpText, xmpExternal, N_("Name of a location the content is focussing on -- either the location shown in visual "
632
                                                                                                                         "media or referenced by text or audio media. This location name could either be the name "
633
                                                                                                                         "of a sublocation to a city or the name of a well known location or (natural) monument "
634
                                                                                                                         "outside a city. In the sense of a sublocation to a city this element is at the fourth "
635
                                                                                                                         "level of a top-down geographical hierarchy.") },
636
        { "Scene",              N_("IPTC Scene"),                  "bag closed Choice of Text", xmpBag, xmpExternal, N_("Describes the scene of a photo content. Specifies one or more terms from the IPTC "
637
                                                                                                                        "\"Scene-NewsCodes\". Each Scene is represented as a string of 6 digits in an unordered list.") },
638
        { "SubjectCode",        N_("IPTC Subject Code"),           "bag closed Choice of Text", xmpBag, xmpExternal, N_("Specifies one or more Subjects from the IPTC \"Subject-NewsCodes\" taxonomy to "
639
                                                                                                                        "categorize the content. Each Subject is represented as a string of 8 digits in an unordered list.") },
640
        // End of list marker
641
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
642
    };
643

    
644
    extern const XmpPropertyInfo xmpIptcExtInfo[] = {
645
        { "AddlModelInfo",           N_("Additional model info"),           "Text",                       xmpText, xmpExternal, N_("Information about the ethnicity and other facts of the model(s) in a model-released image.") },
646
        { "OrganisationInImageCode", N_("Code of featured Organisation"),   "bag Text",                   xmpBag,  xmpExternal, N_("Code from controlled vocabulary for identyfing the organisation or company which is featured in the image.") },
647
        { "CVterm",                  N_("Controlled Vocabulary Term"),      "bag URI",                    xmpBag,  xmpExternal, N_("A term to describe the content of the image by a value from a Controlled Vocabulary.") },
648
        { "ModelAge",                N_("Model age"),                       "bag Integer",                xmpBag,  xmpExternal, N_("Age of the human model(s) at the time this image was taken in a model released image.") },
649
        { "OrganisationInImageName", N_("Name of featured Organisation"),   "bag Text",                   xmpBag,  xmpExternal, N_("Name of the organisation or company which is featured in the image.") },
650
        { "PersonInImage",           N_("Person shown"),                    "bag Text",                   xmpBag,  xmpExternal, N_("Name of a person shown in the image.") },
651
        { "DigImageGUID",            N_("Digital Image Identifier"),        "Text",                       xmpText, xmpExternal, N_("Globally unique identifier for this digital image. It is created and applied by the creator of the digital image at the time of its creation. this value shall not be changed after that time.") },
652
        { "DigitalSourcefileType",   N_("Physical type of original photo"), "URI",                        xmpText, xmpExternal, N_("The type of the source digital file.") },
653
        { "Event",                   N_("Event"),                           "Lang Alt",                   langAlt, xmpExternal, N_("Names or describes the specific event at which the photo was taken.") },
654
        { "MaxAvailHeight",          N_("Maximum available height"),        "Integer",                    xmpText, xmpExternal, N_("The maximum available height in pixels of the original photo from which this photo has been derived by downsizing.") },
655
        { "MaxAvailWidth",           N_("Maximum available width"),         "Integer",                    xmpText, xmpExternal, N_("The maximum available width in pixels of the original photo from which this photo has been derived by downsizing.") },
656
        { "RegistryId",              N_("Registry Entry"),                  "bag RegistryEntryDetails",   xmpBag,  xmpExternal, N_("Both a Registry Item Id and a Registry Organisation Id to record any registration of this digital image with a registry.") },
657
        { "RegItemId",               N_("Registry Entry-Item Identifier"),  "Text",                       xmpText, xmpExternal, N_("A unique identifier created by a registry and applied by the creator of the digital image. This value shall not be changed after being applied. This identifier is linked to a corresponding Registry Organisation Identifier.") },
658
        { "RegOrgId",                N_("Registry Entry-Organisation Identifier"), "Text",                xmpText, xmpExternal, N_("An identifier for the registry which issued the corresponding Registry Image Id.") },
659
        { "IptcLastEdited",          N_("IPTC Fields Last Edited"),         "Date",                       xmpText, xmpExternal, N_("The date and optionally time when any of the IPTC photo metadata fields has been last edited.") },
660
        { "LocationShown",           N_("Location shown"),                  "bag LocationDetails",        xmpBag,  xmpExternal, N_("A location shown in the image.") },
661
        { "LocationCreated",         N_("Location Created"),                "bag LocationDetails",        xmpBag,  xmpExternal, N_("The location the photo was taken.") },
662
        { "City",                    N_("Location-City"),                   "Text",                       xmpText, xmpExternal, N_("Name of the city of a location.") },
663
        { "CountryCode",             N_("Location-Country ISO-Code"),       "Text",                       xmpText, xmpExternal, N_("The ISO code of a country of a location.") },
664
        { "CountryName",             N_("Location-Country Name"),           "Text",                       xmpText, xmpExternal, N_("The name of a country of a location.") },
665
        { "ProvinceState",           N_("Location-Province/State"),         "Text",                       xmpText, xmpExternal, N_("The name of a subregion of a country - a province or state - of a location.") },
666
        { "Sublocation",             N_("Location-Sublocation"),            "Text",                       xmpText, xmpExternal, N_("Name of a sublocation. This sublocation name could either be the name of a sublocation to a city or the name of a well known location or (natural) monument outside a city.") },
667
        { "WorldRegion",             N_("Location-World Region"),           "Text",                       xmpText, xmpExternal, N_("The name of a world region of a location.") },
668
        { "ArtworkOrObject",         N_("Artwork or object in the image"),  "bag ArtworkOrObjectDetails", xmpBag,  xmpExternal, N_("A set of metadata about artwork or an object in the image.") },
669
        { "AOCopyrightNotice",       N_("Artwork or object-Copyright notice"), "Text",                    xmpText, xmpExternal, N_("Contains any necessary copyright notice for claiming the intellectual property for artwork or an object in the image and should identify the current owner of the copyright of this work with associated intellectual property rights.") },
670
        { "AOCreator",               N_("Artwork or object-Creator"),       "seq ProperName",             xmpSeq,  xmpExternal, N_("Contains the name of the artist who has created artwork or an object in the image. In cases where the artist could or should not be identified the name of a company or organisation may be appropriate.") },
671
        { "AODateCreated",           N_("Artwork or object-Date Created"),  "Date",                       xmpText, xmpExternal, N_("Designates the date and optionally the time the artwork or object in the image was created. This relates to artwork or objects with associated intellectual property rights.") },
672
        { "AOSource",                N_("Artwork or object-Source"),        "Text",                       xmpText, xmpExternal, N_("The organisation or body holding and registering the artwork or object in the image for inventory purposes.") },
673
        { "AOSourceInvNo",           N_("Artwork or object-Source inventory number"), "Text",             xmpText, xmpExternal, N_("The inventory number issued by the organisation or body holding and registering the artwork or object in the image.") },
674
        { "AOTitle",                 N_("Artwork or object-Title"),         "Lang Alt",                   langAlt, xmpExternal, N_("A reference for the artwork or object in the image.") },
675
        // End of list marker
676
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
677
    };
678

    
679
    //! XMP iptcExt:DigitalSourcefileType
680
    extern const TagVocabulary iptcExtDigitalSourcefileType[] = {
681
        { "scanfilm",         N_("Scan from film")                           },
682
        { "scantransparency", N_("Scan from transparency (including slide)") },
683
        { "scanprint",        N_("Scan from print")                          },
684
        { "cameraraw",        N_("Camera RAW")                               },
685
        { "cameratiff",       N_("Camera TIFF")                              },
686
        { "camerajpeg",       N_("Camera JPEG")                              }
687
    };
688

    
689
    extern const XmpPropertyInfo xmpPlusInfo[] = {
690
        // PLUS Version 1.2.0
691
        { "Version", N_("PLUS Version"), "Text", xmpText, xmpExternal, N_("The version number of the PLUS standards in place at the time of the transaction.") },
692
        { "Licensee", N_("Licensee"), "seq LicenseeDetail", xmpSeq, xmpExternal, N_("Party or parties to whom the license is granted by the Licensor/s under the license transaction.") },
693
        { "LicenseeID", N_("Licensee ID"), "Text", xmpText, xmpExternal, N_("Optional PLUS-ID identifying each Licensee.") },
694
        { "LicenseeName", N_("Licensee Name"), "ProperName", xmpText, xmpExternal, N_("Name of each Licensee.") },
695
        { "EndUser", N_("End User"), "seq EndUserDetail", xmpSeq, xmpExternal, N_("Party or parties ultimately making use of the image under the license.") },
696
        { "EndUserID", N_("End User ID"), "Text", xmpText, xmpExternal, N_("Optional PLUS-ID identifying each End User.") },
697
        { "EndUserName", N_("End User Name"), "ProperName", xmpText, xmpExternal, N_("Name of each End User.") },
698
        { "Licensor", N_("Licensor"), "seq LicensorDetail", xmpSeq, xmpExternal, N_("Party or parties granting the license to the Licensee.") },
699
        { "LicensorID", N_("Licensor ID"), "Text", xmpText, xmpExternal, N_("Optional PLUS-ID identifying each Licensor.") },
700
        { "LicensorName", N_("Licensor Name"), "ProperName", xmpText, xmpExternal, N_("Name of each Licensor.") },
701
        { "LicensorStreetAddress", N_("Licensor Address"), "Text", xmpText, xmpExternal, N_("Licensor street address.") },
702
        { "LicensorExtendedAddress", N_("Licensor Address Detail"), "Text", xmpText, xmpExternal, N_("Additional Licensor mailing address details.") },
703
        { "LicensorCity", N_("Licensor City"), "Text", xmpText, xmpExternal, N_("Licensor City name.") },
704
        { "LicensorRegion", N_("Licensor State or Province"), "Text", xmpText, xmpExternal, N_("Licensor State or Province name.") },
705
        { "LicensorPostalCode", N_("Licensor Postal Code"), "Text", xmpText, xmpExternal, N_("Licensor Postal Code or Zip Code.") },
706
        { "LicensorCountry", N_("Licensor Country"), "Text", xmpText, xmpExternal, N_("Licensor Country name.") },
707
        { "LicensorTelephoneType1", N_("Licensor Telephone Type 1"), "URL", xmpText, xmpExternal, N_("Licensor Telephone Type 1.") },
708
        { "LicensorTelephone1", N_("Licensor Telephone 1"), "Text", xmpText, xmpExternal, N_("Licensor Telephone number 1.") },
709
        { "LicensorTelephoneType2", N_("Licensor Telephone Type 2"), "URL", xmpText, xmpExternal, N_("Licensor Telephone Type 2.") },
710
        { "LicensorTelephone2", N_("Licensor Telephone 2"), "Text", xmpText, xmpExternal, N_("Licensor Telephone number 2.") },
711
        { "LicensorEmail", N_("Licensor Email"), "Text", xmpText, xmpExternal, N_("Licensor Email address.") },
712
        { "LicensorURL", N_("Licensor URL"), "URL", xmpText, xmpExternal, N_("Licensor world wide web address.") },
713
        { "LicensorNotes", N_("Licensor Notes"), "Lang Alt", langAlt, xmpExternal, N_("Supplemental information for use in identifying and contacting the Licensor/s.") },
714
        { "MediaSummaryCode", N_("PLUS Media Summary Code"), "Text", xmpText, xmpExternal, N_("A PLUS-standardized alphanumeric code string summarizing the media usages included in the license.") },
715
        { "LicenseStartDate", N_("License Start Date"), "Date", xmpText, xmpExternal, N_("The date on which the license takes effect.") },
716
        { "LicenseEndDate", N_("License End Date"), "Date", xmpText, xmpExternal, N_("The date on which the license expires.") },
717
        { "MediaConstraints", N_("Media Constraints"), "Lang Alt", langAlt, xmpExternal, N_("Constraints limiting the scope of PLUS Media Usage/s included in the license to particular named media or to media not yet specifically defined in the PLUS Media Matrix.") },
718
        { "RegionConstraints", N_("Region Constraints"), "Lang Alt", langAlt, xmpExternal, N_("Constraints limiting the scope of geographic distribution to specific cities, states, provinces or other areas to be included in or excluded from the PLUS Regions specified in the Media Usages specified in the license.") },
719
        { "ProductOrServiceConstraints", N_("Product or Service Constraints"), "Lang Alt", langAlt, xmpExternal, N_("Constraints limiting usage of the image to promotion of/association with a named product or service.") },
720
        { "ImageFileConstraints", N_("Image File Constraints"), "bag URL", xmpBag, xmpExternal, N_("Constraints on the changing of the image file name, metadata or file type.") },
721
        { "ImageAlterationConstraints", N_("Image Alteration Constraints"), "bag URL", xmpBag, xmpExternal, N_("Constraints on alteration of the image by cropping, flipping, retouching, colorization, de-colorization or merging.") },
722
        { "ImageDuplicationConstraints", N_("Image Duplication Constraints"), "URL", xmpText, xmpExternal, N_("Constraints on the creation of duplicates of the image.") },
723
        { "ModelReleaseStatus", N_("Model Release Status"), "URL", xmpText, xmpExternal, N_("Summarizes the availability and scope of model releases authorizing usage of the likenesses of persons appearing in the photograph.") },
724
        { "ModelReleaseID", N_("Model Release ID"), "bag Text", xmpBag, xmpExternal, N_("Optional identifier associated with each Model Release.") },
725
        { "MinorModelAgeDisclosure", N_("Minor Model Age Disclosure"), "URL", xmpText, xmpExternal, N_("Age of the youngest model pictured in the image, at the time that the image was made.") },
726
        { "PropertyReleaseStatus", N_("Property Release Status"), "URL", xmpText, xmpExternal, N_("Summarizes the availability and scope of property releases authorizing usage of the properties appearing in the photograph.") },
727
        { "PropertyReleaseID", N_("Property Release ID"), "bag Text", xmpBag, xmpExternal, N_("Optional identifier associated with each Property Release.") },
728
        { "OtherConstraints", N_("Other Constraints"), "Lang Alt", langAlt, xmpExternal, N_("Additional constraints on the license.") },
729
        { "CreditLineRequired", N_("Credit Line Required"), "URL", xmpText, xmpExternal, N_("Attribution requirements, if any.") },
730
        { "AdultContentWarning", N_("Adult Content Warning"), "URL", xmpText, xmpExternal, N_("Warning indicating the presence of content not suitable for minors.") },
731
        { "OtherLicenseRequirements", N_("Other License Requirements"), "Lang Alt", langAlt, xmpExternal, N_("Additional license requirements.") },
732
        { "TermsAndConditionsText", N_("Terms and Conditions Text"), "Lang Alt", langAlt, xmpExternal, N_("Terms and Conditions applying to the license.") },
733
        { "TermsAndConditionsURL", N_("Terms and Conditions URL"), "URL", xmpText, xmpExternal, N_("URL for Terms and Conditions applying to the license.") },
734
        { "OtherConditions", N_("Other License Conditions"), "Lang Alt", langAlt, xmpExternal, N_("Additional license conditions.") },
735
        { "ImageType", N_("Image Type"), "URL", xmpText, xmpExternal, N_("Identifies the type of image delivered.") },
736
        { "LicensorImageID", N_("Licensor Image ID"), "Text", xmpText, xmpExternal, N_("Optional identifier assigned by the Licensor to the image.") },
737
        { "FileNameAsDelivered", N_("Image File Name As Delivered"), "Text", xmpText, xmpExternal, N_("Name of the image file delivered to the Licensee for use under the license.") },
738
        { "ImageFileFormatAsDelivered", N_("Image File Format As Delivered"), "URL", xmpText, xmpExternal, N_("File format of the image file delivered to the Licensee for use under the license.") },
739
        { "ImageFileSizeAsDelivered", N_("Image File Size As Delivered"), "URL", xmpText, xmpExternal, N_("Size of the image file delivered to the Licensee.") },
740
        { "CopyrightStatus", N_("Copyright Status"), "URL", xmpText, xmpExternal, N_("Copyright status of the image.") },
741
        { "CopyrightRegistrationNumber", N_("Copyright Registration Number"), "Text", xmpText, xmpExternal, N_("Copyright Registration Number, if any, applying to the licensed image.") },
742
        { "FirstPublicationDate", N_("First Publication Date"), "Date", xmpText, xmpExternal, N_("The date on which the image was first published.") },
743
        { "CopyrightOwner", N_("Copyright Owner"), "seq CopyrightOwnerDetail", xmpSeq, xmpExternal, N_("Owner or owners of the copyright in the licensed image.") },
744
        { "CopyrightOwnerID", N_("Copyright Owner ID"), "Text", xmpText, xmpExternal, N_("Optional PLUS-ID identifying each Copyright Owner.") },
745
        { "CopyrightOwnerName", N_("Copyright Owner Name"), "ProperName", xmpText, xmpExternal, N_("Name of Copyright Owner.") },
746
        { "CopyrightOwnerImageID", N_("Copyright Owner Image ID"), "Text", xmpText, xmpExternal, N_("Optional identifier assigned by the Copyright Owner to the image.") },
747
        { "ImageCreator", N_("Image Creator"), "seq ImageCreatorDetail", xmpSeq, xmpExternal, N_("Creator/s of the image.") },
748
        { "ImageCreatorID", N_("Image Creator ID"), "Text", xmpText, xmpExternal, N_("Optional PLUS-ID identifying each Image Creator.") },
749
        { "ImageCreatorName", N_("Image Creator Name"), "ProperName", xmpText, xmpExternal, N_("Name of Image Creator.") },
750
        { "ImageCreatorImageID", N_("Image Creator Image ID"), "Text", xmpText, xmpExternal, N_("Optional identifier assigned by the Image Creator to the image.") },
751
        { "ImageSupplierID", N_("Image Supplier ID"), "Text", xmpText, xmpExternal, N_("Optional PLUS-ID identifying the Image Supplier.") },
752
        { "ImageSupplierName", N_("Image Supplier Name"), "ProperName", xmpText, xmpExternal, N_("Name of Image Supplier.") },
753
        { "ImageSupplierImageID", N_("Image Supplier Image ID"), "Text", xmpText, xmpExternal, N_("Optional identifier assigned by the Image Supplier to the image.") },
754
        { "LicenseeImageID", N_("Licensee Image ID"), "Text", xmpText, xmpExternal, N_("Optional identifier assigned by the Licensee to the image.") },
755
        { "LicenseeImageNotes", N_("Licensee Image Notes"), "Lang Alt", langAlt, xmpExternal, N_("Notes added by Licensee.") },
756
        { "OtherImageInfo", N_("Other Image Info"), "Lang Alt", langAlt, xmpExternal, N_("Additional image information.") },
757
        { "LicenseID", N_("License ID"), "Text", xmpText, xmpExternal, N_("Optional PLUS-ID assigned by the Licensor to the License.") },
758
        { "LicensorTransactionID", N_("Licensor Transaction ID"), "bag Text", xmpBag, xmpExternal, N_("Identifier assigned by Licensor for Licensor's reference and internal use.") },
759
        { "LicenseeTransactionID", N_("Licensee Transaction ID"), "bag Text", xmpBag, xmpExternal, N_("Identifier assigned by Licensee for Licensee's reference and internal use.") },
760
        { "LicenseeProjectReference", N_("Licensee Project Reference"), "bag Text", xmpBag, xmpExternal, N_("Project reference name or description assigned by Licensee.") },
761
        { "LicenseTransactionDate", N_("License Transaction Date"), "Date", xmpText, xmpExternal, N_("The date of the License Transaction.") },
762
        { "Reuse", N_("Reuse"), "URL", xmpText, xmpExternal, N_("Indicates whether a license is a repeat or an initial license.  Reuse may require that licenses stored in files previously delivered to the customer be updated.") },
763
        { "OtherLicenseDocuments", N_("Other License Documents"), "bag Text", xmpBag, xmpExternal, N_("Reference information for additional documents associated with the license.") },
764
        { "OtherLicenseInfo", N_("Other License Info"), "Lang Alt", langAlt, xmpExternal, N_("Additional license information.") },
765
        { "Custom1", N_("Custom 1"), "bag Lang Alt", xmpBag, xmpExternal, N_("Optional field for use at Licensor's discretion.") },
766
        { "Custom2", N_("Custom 2"), "bag Lang Alt", xmpBag, xmpExternal, N_("Optional field for use at Licensor's discretion.") },
767
        { "Custom3", N_("Custom 3"), "bag Lang Alt", xmpBag, xmpExternal, N_("Optional field for use at Licensor's discretion.") },
768
        { "Custom4", N_("Custom 4"), "bag Lang Alt", xmpBag, xmpExternal, N_("Optional field for use at Licensor's discretion.") },
769
        { "Custom5", N_("Custom 5"), "bag Lang Alt", xmpBag, xmpExternal, N_("Optional field for use at Licensor's discretion.") },
770
        { "Custom6", N_("Custom 6"), "bag Lang Alt", xmpBag, xmpExternal, N_("Optional field for use at Licensee's discretion.") },
771
        { "Custom7", N_("Custom 7"), "bag Lang Alt", xmpBag, xmpExternal, N_("Optional field for use at Licensee's discretion.") },
772
        { "Custom8", N_("Custom 8"), "bag Lang Alt", xmpBag, xmpExternal, N_("Optional field for use at Licensee's discretion.") },
773
        { "Custom9", N_("Custom 9"), "bag Lang Alt", xmpBag, xmpExternal, N_("Optional field for use at Licensee's discretion.") },
774
        { "Custom10", N_("Custom 10"), "bag Lang Alt", xmpBag, xmpExternal, N_("Optional field for use at Licensee's discretion.") },
775
        // End of list marker
776
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
777
    };
778

    
779

    
780
        //! XMP plus:AdultContentWarning
781
    extern const TagVocabulary plusAdultContentWarning[] = {
782
        { "CW-AWR", N_("Adult Content Warning Required") },
783
        { "CW-NRQ", N_("Not Required")                   },
784
        { "CW-UNK", N_("Unknown")                        }
785
    };
786

    
787
    //! XMP plus:CopyrightStatus
788
    extern const TagVocabulary plusCopyrightStatus[] = {
789
        { "CS-PRO", N_("Protected")     },
790
        { "CS-PUB", N_("Public Domain") },
791
        { "CS-UNK", N_("Unknown")       }
792
    };
793

    
794
    //! XMP plus:CreditLineRequired
795
    extern const TagVocabulary plusCreditLineRequired[] = {
796
        { "CR-CAI", N_("Credit Adjacent To Image") },
797
        { "CR-CCA", N_("Credit in Credits Area")   },
798
        { "CR-COI", N_("Credit on Image")          },
799
        { "CR-NRQ", N_("Not Require")              }
800
    };
801

    
802
    //! XMP plus:ImageAlterationConstraints
803
    extern const TagVocabulary plusImageAlterationConstraints[] = {
804
        { "AL-CLR", N_("No Colorization")    },
805
        { "AL-CRP", N_("No Cropping")        },
806
        { "AL-DCL", N_("No De-Colorization") },
807
        { "AL-FLP", N_("No Flipping")        },
808
        { "AL-MRG", N_("No Merging")         },
809
        { "AL-RET", N_("No Retouching")      }
810
    };
811

    
812
    //! XMP plus:ImageDuplicationConstraints
813
    extern const TagVocabulary plusImageDuplicationConstraints[] = {
814
        { "DP-LIC", N_("Duplication Only as Necessary Under License") },
815
        { "DP-NDC", N_("No Duplication Constraints")                  },
816
        { "DP-NOD", N_("No Duplication")                              }
817
    };
818

    
819
    //! XMP plus:ImageFileConstraints
820
    extern const TagVocabulary plusImageFileConstraints[] = {
821
        { "IF-MFN", N_("Maintain File Name")       },
822
        { "IF-MFT", N_("Maintain File Type")       },
823
        { "IF-MID", N_("Maintain ID in File Name") },
824
        { "IF-MMD", N_("Maintain Metadata")        }
825
    };
826

    
827
    //! XMP plus:ImageFileFormatAsDelivered
828
    extern const TagVocabulary plusImageFileFormatAsDelivered[] = {
829
        { "FF-BMP", N_("Windows Bitmap (BMP)")                      },
830
        { "FF-DNG", N_("Digital Negative (DNG)")                    },
831
        { "FF-EPS", N_("Encapsulated PostScript (EPS)")             },
832
        { "FF-GIF", N_("Graphics Interchange Format (GIF)")         },
833
        { "FF-JPG", N_("JPEG Interchange Formats (JPG, JIF, JFIF)") },
834
        { "FF-OTR", N_("Other")                                     },
835
        { "FF-PIC", N_("Macintosh Picture (PICT)")                  },
836
        { "FF-PNG", N_("Portable Network Graphics (PNG)")           },
837
        { "FF-PSD", N_("Photoshop Document (PSD)")                  },
838
        { "FF-RAW", N_("Proprietary RAW Image Format")              },
839
        { "FF-TIF", N_("Tagged Image File Format (TIFF)")           },
840
        { "FF-WMP", N_("Windows Media Photo (HD Photo)")            }
841
    };
842

    
843
    //! XMP plus:ImageFileSizeAsDelivered
844
    extern const TagVocabulary plusImageFileSizeAsDelivered[] = {
845
        { "SZ-G50", N_("Greater than 50 MB") },
846
        { "SZ-U01", N_("Up to 1 MB")         },
847
        { "SZ-U10", N_("Up to 10 MB")        },
848
        { "SZ-U30", N_("Up to 30 MB")        },
849
        { "SZ-U50", N_("Up to 50 MB")        }
850
    };
851

    
852
    //! XMP plus:ImageType
853
    extern const TagVocabulary plusImageType[] = {
854
        { "TY-ILL", N_("Illustrated Image")              },
855
        { "TY-MCI", N_("Multimedia or Composited Image") },
856
        { "TY-OTR", N_("Other")                          },
857
        { "TY-PHO", N_("Photographic Image")             },
858
        { "TY-VID", N_("Video")                          }
859
    };
860

    
861
    //! XMP plus:LicensorTelephoneType
862
    extern const TagVocabulary plusLicensorTelephoneType[] = {
863
        { "cell",  N_("Cell")  },
864
        { "fax",   N_("FAX")   },
865
        { "home",  N_("Home")  },
866
        { "pager", N_("Pager") },
867
        { "work",  N_("Work")  }
868
    };
869

    
870
    //! XMP plus:MinorModelAgeDisclosure
871
    extern const TagVocabulary plusMinorModelAgeDisclosure[] = {
872
        { "AG-UNK", N_("Age Unknown")     },
873
        { "AG-A25", N_("Age 25 or Over")  },
874
        { "AG-A24", N_("Age 24")          },
875
        { "AG-A23", N_("Age 23")          },
876
        { "AG-A22", N_("Age 22")          },
877
        { "AG-A21", N_("Age 21")          },
878
        { "AG-A20", N_("Age 20")          },
879
        { "AG-A19", N_("Age 19")          },
880
        { "AG-A18", N_("Age 18")          },
881
        { "AG-A17", N_("Age 17")          },
882
        { "AG-A16", N_("Age 16")          },
883
        { "AG-A15", N_("Age 15")          },
884
        { "AG-U14", N_("Age 14 or Under") }
885
    };
886

    
887
    //! XMP plus:ModelReleaseStatus
888
    extern const TagVocabulary plusModelReleaseStatus[] = {
889
        { "MR-NON", N_("None")                                 },
890
        { "MR-NAP", N_("Not Applicable")                       },
891
        { "MR-UMR", N_("Unlimited Model Releases")             },
892
        { "MR-LMR", N_("Limited or Incomplete Model Releases") }
893
    };
894

    
895
    //! XMP plus:PropertyReleaseStatus
896
    extern const TagVocabulary plusPropertyReleaseStatus[] = {
897
        { "PR-NON", N_("None")                                    },
898
        { "PR-NAP", N_("Not Applicable")                          },
899
        { "PR-UPR", N_("Unlimited Property Releases")             },
900
        { "PR-LPR", N_("Limited or Incomplete Property Releases") }
901
    };
902

    
903
    //! XMP plus:Reuse
904
    extern const TagVocabulary plusReuse[] = {
905
        { "RE-NAP", N_("Not Applicable") },
906
        { "RE-REU", N_("Repeat Use")     }
907
    };
908

    
909
    extern const XmpPrintInfo xmpPrintInfo[] = {
910
        {"Xmp.crs.CropUnits",                 EXV_PRINT_TAG(crsCropUnits)   },
911
        {"Xmp.exif.ApertureValue",            print0x9202                   },
912
        {"Xmp.exif.BrightnessValue",          printFloat                    },
913
        {"Xmp.exif.ColorSpace",               print0xa001                   },
914
        {"Xmp.exif.ComponentsConfiguration",  print0x9101                   },
915
        {"Xmp.exif.Contrast",                 printNormalSoftHard           },
916
        {"Xmp.exif.CreateDate",               printXmpDate                  },
917
        {"Xmp.exif.CustomRendered",           print0xa401                   },
918
        {"Xmp.exif.DateTimeOriginal",         printXmpDate                  },
919
        {"Xmp.exif.ExifVersion",              printXmpVersion               },
920
        {"Xmp.exif.ExposureBiasValue",        print0x9204                   },
921
        {"Xmp.exif.ExposureMode",             print0xa402                   },
922
        {"Xmp.exif.ExposureProgram",          print0x8822                   },
923
        {"Xmp.exif.FileSource",               print0xa300                   },
924
        {"Xmp.exif.FlashpixVersion",          printXmpVersion               },
925
        {"Xmp.exif.FNumber",                  print0x829d                   },
926
        {"Xmp.exif.FocalLength",              print0x920a                   },
927
        {"Xmp.exif.FocalPlaneResolutionUnit", printExifUnit                 },
928
        {"Xmp.exif.FocalPlaneXResolution",    printFloat                    },
929
        {"Xmp.exif.FocalPlaneYResolution",    printFloat                    },
930
        {"Xmp.exif.GainControl",              print0xa407                   },
931
        {"Xmp.exif.GPSAltitudeRef",           print0x0005                   },
932
        {"Xmp.exif.GPSDestBearingRef",        printGPSDirRef                },
933
        {"Xmp.exif.GPSDestDistanceRef",       print0x0019                   },
934
        {"Xmp.exif.GPSDifferential",          print0x001e                   },
935
        {"Xmp.exif.GPSImgDirectionRef",       printGPSDirRef                },
936
        {"Xmp.exif.GPSMeasureMode",           print0x000a                   },
937
        {"Xmp.exif.GPSSpeedRef",              print0x000c                   },
938
        {"Xmp.exif.GPSStatus",                print0x0009                   },
939
        {"Xmp.exif.GPSTimeStamp",             printXmpDate                  },
940
        {"Xmp.exif.GPSTrackRef",              printGPSDirRef                },
941
        {"Xmp.exif.LightSource",              print0x9208                   },
942
        {"Xmp.exif.MeteringMode",             print0x9207                   },
943
        {"Xmp.exif.ModifyDate",               printXmpDate                  },
944
        {"Xmp.exif.Saturation",               print0xa409                   },
945
        {"Xmp.exif.SceneCaptureType",         print0xa406                   },
946
        {"Xmp.exif.SceneType",                print0xa301                   },
947
        {"Xmp.exif.SensingMethod",            print0xa217                   },
948
        {"Xmp.exif.Sharpness",                printNormalSoftHard           },
949
        {"Xmp.exif.ShutterSpeedValue",        print0x9201                   },
950
        {"Xmp.exif.SubjectDistanceRange",     print0xa40c                   },
951
        {"Xmp.exif.WhiteBalance",             print0xa403                   },
952
        {"Xmp.tiff.Orientation",              print0x0112                   },
953
        {"Xmp.tiff.ResolutionUnit",           printExifUnit                 },
954
        {"Xmp.tiff.XResolution",              printLong                     },
955
        {"Xmp.tiff.YCbCrPositioning",         print0x0213                   },
956
        {"Xmp.tiff.YResolution",              printLong                     },
957
        {"Xmp.iptcExt.DigitalSourcefileType",    EXV_PRINT_VOCABULARY(iptcExtDigitalSourcefileType)   },
958
        {"Xmp.plus.AdultContentWarning",         EXV_PRINT_VOCABULARY(plusAdultContentWarning)        },
959
        {"Xmp.plus.CopyrightStatus",             EXV_PRINT_VOCABULARY(plusCopyrightStatus)            },
960
        {"Xmp.plus.CreditLineRequired",          EXV_PRINT_VOCABULARY(plusCreditLineRequired)         },
961
        {"Xmp.plus.ImageAlterationConstraints",  EXV_PRINT_VOCABULARY(plusImageAlterationConstraints) },
962
        {"Xmp.plus.ImageDuplicationConstraints", EXV_PRINT_VOCABULARY(plusImageDuplicationConstraints)},
963
        {"Xmp.plus.ImageFileConstraints",        EXV_PRINT_VOCABULARY(plusImageFileConstraints)       },
964
        {"Xmp.plus.ImageFileFormatAsDelivered",  EXV_PRINT_VOCABULARY(plusImageFileFormatAsDelivered) },
965
        {"Xmp.plus.ImageFileSizeAsDelivered",    EXV_PRINT_VOCABULARY(plusImageFileSizeAsDelivered)   },
966
        {"Xmp.plus.ImageType",                   EXV_PRINT_VOCABULARY(plusImageType)                  },
967
        {"Xmp.plus.LicensorTelephoneType1",      EXV_PRINT_VOCABULARY(plusLicensorTelephoneType)      },
968
        {"Xmp.plus.LicensorTelephoneType2",      EXV_PRINT_VOCABULARY(plusLicensorTelephoneType)      },
969
        {"Xmp.plus.MinorModelAgeDisclosure",     EXV_PRINT_VOCABULARY(plusMinorModelAgeDisclosure)    },
970
        {"Xmp.plus.ModelReleaseStatus",          EXV_PRINT_VOCABULARY(plusModelReleaseStatus)         },
971
        {"Xmp.plus.PropertyReleaseStatus",       EXV_PRINT_VOCABULARY(plusPropertyReleaseStatus)      },
972
        {"Xmp.plus.Reuse",                       EXV_PRINT_VOCABULARY(plusReuse)                      }
973
    };
974

    
975
    extern const XmpPropertyInfo XmpmediaproInfo[] = {
976
		{ "Event",        N_("Event"),        "Text",       xmpText, xmpExternal, N_("Fixture Identification") },
977
		{ "Status",        N_("Status"),        "Text",       xmpText, xmpExternal, N_("A notation making the image unique") },
978
		{ "People",        N_("People"),        "bag Text",       xmpBag, xmpExternal, N_("Contact") },
979
		{ "CatalogSets",        N_("CatalogSets"),        "bag Text",       xmpBag, xmpExternal, N_("Descriptive markers of catalog items by content") },
980
		// End of list marker
981
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
982
    };
983

    
984
        extern const XmpPropertyInfo XmpexpressionmediaInfo[] = {
985
		{ "Event",        N_("Event"),        "Text",       xmpText, xmpExternal, N_("Fixture Identification") },
986
		{ "Status",        N_("Status"),        "Text",       xmpText, xmpExternal, N_("A notation making the image unique") },
987
		{ "People",        N_("People"),        "bag Text",       xmpBag, xmpExternal, N_("Contact") },
988
		{ "CatalogSets",        N_("CatalogSets"),        "bag Text",       xmpBag, xmpExternal, N_("Descriptive markers of catalog items by content") },
989
		// End of list marker
990
        { 0, 0, 0, invalidTypeId, xmpInternal, 0 }
991
    };
992

    
993
    XmpNsInfo::Ns::Ns(const std::string& ns)
994
        : ns_(ns)
995
    {
996
    }
997

    
998
    XmpNsInfo::Prefix::Prefix(const std::string& prefix)
999
        : prefix_(prefix)
1000
    {
1001
    }
1002

    
1003
    bool XmpNsInfo::operator==(const XmpNsInfo::Ns& ns) const
1004
    {
1005
        std::string n(ns_);
1006
        return n == ns.ns_;
1007
    }
1008

    
1009
    bool XmpNsInfo::operator==(const XmpNsInfo::Prefix& prefix) const
1010
    {
1011
        std::string p(prefix_);
1012
        return p == prefix.prefix_;
1013
    }
1014

    
1015
    bool XmpPropertyInfo::operator==(const std::string& name) const
1016
    {
1017
        std::string n(name_);
1018
        return n == name;
1019
    }
1020

    
1021
    XmpProperties::NsRegistry XmpProperties::nsRegistry_;
1022

    
1023
    const XmpNsInfo* XmpProperties::lookupNsRegistry(const XmpNsInfo::Prefix& prefix)
1024
    {
1025
        for (NsRegistry::const_iterator i = nsRegistry_.begin();
1026
             i != nsRegistry_.end(); ++i) {
1027
            if (i->second == prefix) return &(i->second);
1028
        }
1029
        return 0;
1030
    }
1031

    
1032
    void XmpProperties::registerNs(const std::string& ns,
1033
                                   const std::string& prefix)
1034
    {
1035
        std::string ns2 = ns;
1036
        if (   ns2.substr(ns2.size() - 1, 1) != "/"
1037
            && ns2.substr(ns2.size() - 1, 1) != "#") ns2 += "/";
1038
        // Allocated memory is freed when the namespace is unregistered.
1039
        // Using malloc/free for better system compatibility in case
1040
        // users don't unregister their namespaces explicitely.
1041
        XmpNsInfo xn;
1042
        char* c = static_cast<char*>(std::malloc(ns2.size() + 1));
1043
        std::strcpy(c, ns2.c_str());
1044
        xn.ns_ = c;
1045
        c = static_cast<char*>(std::malloc(prefix.size() + 1));
1046
        std::strcpy(c, prefix.c_str());
1047
        xn.prefix_ = c;
1048
        xn.xmpPropertyInfo_ = 0;
1049
        xn.desc_ = "";
1050
        nsRegistry_[ns2] = xn;
1051
        XmpParser::registerNs(ns2, prefix);
1052
    }
1053

    
1054
    void XmpProperties::unregisterNs(const std::string& ns)
1055
    {
1056
        NsRegistry::iterator i = nsRegistry_.find(ns);
1057
        if (i != nsRegistry_.end()) {
1058
            XmpParser::unregisterNs(ns);
1059
            std::free(const_cast<char*>(i->second.prefix_));
1060
            std::free(const_cast<char*>(i->second.ns_));
1061
            nsRegistry_.erase(i);
1062
        }
1063
    }
1064

    
1065
    void XmpProperties::unregisterNs()
1066
    {
1067
        NsRegistry::iterator i = nsRegistry_.begin();
1068
        while (i != nsRegistry_.end()) {
1069
            NsRegistry::iterator kill = i++;
1070
            unregisterNs(kill->first);
1071
        }
1072
    }
1073

    
1074
    std::string XmpProperties::prefix(const std::string& ns)
1075
    {
1076
        std::string ns2 = ns;
1077
        if (   ns2.substr(ns2.size() - 1, 1) != "/"
1078
            && ns2.substr(ns2.size() - 1, 1) != "#") ns2 += "/";
1079
        NsRegistry::const_iterator i = nsRegistry_.find(ns2);
1080
        std::string p;
1081
        if (i != nsRegistry_.end()) {
1082
            p = i->second.prefix_;
1083
        }
1084
        else {
1085
            const XmpNsInfo* xn = find(xmpNsInfo, XmpNsInfo::Ns(ns2));
1086
            if (xn) p = std::string(xn->prefix_);
1087
        }
1088
        return p;
1089
    }
1090

    
1091
    std::string XmpProperties::ns(const std::string& prefix)
1092
    {
1093
        const XmpNsInfo* xn = lookupNsRegistry(XmpNsInfo::Prefix(prefix));
1094
        if (xn != 0) return xn->ns_;
1095
        return nsInfo(prefix)->ns_;
1096
    }
1097

    
1098
    const char* XmpProperties::propertyTitle(const XmpKey& key)
1099
    {
1100
        const XmpPropertyInfo* pi = propertyInfo(key);
1101
        return pi ? pi->title_ : 0;
1102
    }
1103

    
1104
    const char* XmpProperties::propertyDesc(const XmpKey& key)
1105
    {
1106
        const XmpPropertyInfo* pi = propertyInfo(key);
1107
        return pi ? pi->desc_ : 0;
1108
    }
1109

    
1110
    TypeId XmpProperties::propertyType(const XmpKey& key)
1111
    {
1112
        const XmpPropertyInfo* pi = propertyInfo(key);
1113
        return pi ? pi->typeId_ : xmpText;
1114
    }
1115

    
1116
    const XmpPropertyInfo* XmpProperties::propertyInfo(const XmpKey& key)
1117
    {
1118
        const XmpPropertyInfo* pl = propertyList(key.groupName());
1119
        if (!pl) return 0;
1120
        const XmpPropertyInfo* pi = 0;
1121
        for (int i = 0; pl[i].name_ != 0; ++i) {
1122
            if (0 == strcmp(pl[i].name_, key.tagName().c_str())) {
1123
                pi = pl + i;
1124
                break;
1125
            }
1126
        }
1127
        return pi;
1128
    }
1129

    
1130
    const char* XmpProperties::nsDesc(const std::string& prefix)
1131
    {
1132
        return nsInfo(prefix)->desc_;
1133
    }
1134

    
1135
    const XmpPropertyInfo* XmpProperties::propertyList(const std::string& prefix)
1136
    {
1137
        return nsInfo(prefix)->xmpPropertyInfo_;
1138
    }
1139

    
1140
    const XmpNsInfo* XmpProperties::nsInfo(const std::string& prefix)
1141
    {
1142
        const XmpNsInfo::Prefix pf(prefix);
1143
        const XmpNsInfo* xn = lookupNsRegistry(pf);
1144
        if (!xn) xn = find(xmpNsInfo, pf);
1145
        if (!xn) throw Error(35, prefix);
1146
        return xn;
1147
    }
1148

    
1149
    void XmpProperties::printProperties(std::ostream& os, const std::string& prefix)
1150
    {
1151
        const XmpPropertyInfo* pl = propertyList(prefix);
1152
        if (pl) {
1153
            for (int i = 0; pl[i].name_ != 0; ++i) {
1154
                os << pl[i];
1155
            }
1156
        }
1157

    
1158
    } // XmpProperties::printProperties
1159

    
1160
    std::ostream& XmpProperties::printProperty(std::ostream& os,
1161
                                               const std::string& key,
1162
                                               const Value& value)
1163
    {
1164
        PrintFct fct = printValue;
1165
        if (value.count() != 0) {
1166
            const XmpPrintInfo* info = find(xmpPrintInfo, key);
1167
            if (info) fct = info->printFct_;
1168
        }
1169
        return fct(os, value, 0);
1170
    }
1171

    
1172
    //! @cond IGNORE
1173

    
1174
    //! Internal Pimpl structure with private members and data of class XmpKey.
1175
    struct XmpKey::Impl {
1176
        Impl() {}                       //!< Default constructor
1177
        Impl(const std::string& prefix, const std::string& property); //!< Constructor
1178

    
1179
        /*!
1180
          @brief Parse and convert the \em key string into property and prefix.
1181
                 Updates data members if the string can be decomposed, or throws
1182
                 \em Error.
1183

    
1184
          @throw Error if the key cannot be decomposed.
1185
        */
1186
        void decomposeKey(const std::string& key);
1187

    
1188
        // DATA
1189
        static const char* familyName_; //!< "Xmp"
1190

    
1191
        std::string prefix_;            //!< Prefix
1192
        std::string property_;          //!< Property name
1193
    };
1194
    //! @endcond
1195

    
1196
    XmpKey::Impl::Impl(const std::string& prefix, const std::string& property)
1197
    {
1198
        // Validate prefix
1199
        if (XmpProperties::ns(prefix).empty()) throw Error(46, prefix);
1200

    
1201
        property_ = property;
1202
        prefix_ = prefix;
1203
    }
1204

    
1205
    const char* XmpKey::Impl::familyName_ = "Xmp";
1206

    
1207
    XmpKey::XmpKey(const std::string& key)
1208
        : p_(new Impl)
1209
    {
1210
        p_->decomposeKey(key);
1211
    }
1212

    
1213
    XmpKey::XmpKey(const std::string& prefix, const std::string& property)
1214
        : p_(new Impl(prefix, property))
1215
    {
1216
    }
1217

    
1218
    XmpKey::~XmpKey()
1219
    {
1220
        delete p_;
1221
    }
1222

    
1223
    XmpKey::XmpKey(const XmpKey& rhs)
1224
        : Key(rhs), p_(new Impl(*rhs.p_))
1225
    {
1226
    }
1227

    
1228
    XmpKey& XmpKey::operator=(const XmpKey& rhs)
1229
    {
1230
        if (this == &rhs) return *this;
1231
        *p_ = *rhs.p_;
1232
        return *this;
1233
    }
1234

    
1235
    XmpKey::AutoPtr XmpKey::clone() const
1236
    {
1237
        return AutoPtr(clone_());
1238
    }
1239

    
1240
    XmpKey* XmpKey::clone_() const
1241
    {
1242
        return new XmpKey(*this);
1243
    }
1244

    
1245
    std::string XmpKey::key() const
1246
    {
1247
        return std::string(p_->familyName_) + "." + p_->prefix_ + "." + p_->property_;
1248
    }
1249

    
1250
    const char* XmpKey::familyName() const
1251
    {
1252
        return p_->familyName_;
1253
    }
1254

    
1255
    std::string XmpKey::groupName() const
1256
    {
1257
        return p_->prefix_;
1258
    }
1259

    
1260
    std::string XmpKey::tagName() const
1261
    {
1262
        return p_->property_;
1263
    }
1264

    
1265
    std::string XmpKey::tagLabel() const
1266
    {
1267
        const char* pt = XmpProperties::propertyTitle(*this);
1268
        if (!pt) return tagName();
1269
        return pt;
1270
    }
1271

    
1272
    uint16_t XmpKey::tag() const
1273
    {
1274
        return 0;
1275
    }
1276

    
1277
    std::string XmpKey::ns() const
1278
    {
1279
        return XmpProperties::ns(p_->prefix_);
1280
    }
1281

    
1282
    void XmpKey::Impl::decomposeKey(const std::string& key)
1283
    {
1284
        // Get the family name, prefix and property name parts of the key
1285
        std::string::size_type pos1 = key.find('.');
1286
        if (pos1 == std::string::npos) throw Error(6, key);
1287
        std::string familyName = key.substr(0, pos1);
1288
        if (0 != strcmp(familyName.c_str(), familyName_)) {
1289
            throw Error(6, key);
1290
        }
1291
        std::string::size_type pos0 = pos1 + 1;
1292
        pos1 = key.find('.', pos0);
1293
        if (pos1 == std::string::npos) throw Error(6, key);
1294
        std::string prefix = key.substr(pos0, pos1 - pos0);
1295
        if (prefix == "") throw Error(6, key);
1296
        std::string property = key.substr(pos1 + 1);
1297
        if (property == "") throw Error(6, key);
1298

    
1299
        // Validate prefix
1300
        if (XmpProperties::ns(prefix).empty()) throw Error(46, prefix);
1301

    
1302
        property_ = property;
1303
        prefix_ = prefix;
1304
    } // XmpKey::Impl::decomposeKey
1305

    
1306
    // *************************************************************************
1307
    // free functions
1308
    std::ostream& operator<<(std::ostream& os, const XmpPropertyInfo& property)
1309
    {
1310
        return os << property.name_                       << ",\t"
1311
                  << property.title_                      << ",\t"
1312
                  << property.xmpValueType_               << ",\t"
1313
                  << TypeInfo::typeName(property.typeId_) << ",\t"
1314
                  << ( property.xmpCategory_ == xmpExternal ? "External" : "Internal" ) << ",\t"
1315
                  << property.desc_                       << "\n";
1316
    }
1317
    //! @endcond
1318

    
1319
}                                       // namespace Exiv2
    (1-1/1)