-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
119 lines (95 loc) · 5.55 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
LICENSE
------------------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
DESCRIPTION
------------------------------------------------------------------------------
This file allows you to write AVM tags in XMP format to a file using the Perl
package Exiftool. The AVM standard currently supported is version 1.1.
XMP
------------------------------------------------------------------------------
XMP is Adobe's format for embedding an XML file within a multimedia binary
file. EXIF data has been formerly used to embed metadata within a JPG file.
XMP was created to overcome the size and datatype limitations of EXIF. XMP
uses an RDF subset of XML to describe the metadata for an attached multimedia
file. Most of the advantages and disadvantages of XMP revolve around the
choice of RDF for the metadata format.
ADVANTAGES OF XMP
------------------------------------------------------------------------------
EXIF data limited both the size and datatype of metadata that could be
attached to a file. XMP overcomes these limitations by storing arbitrary
data in an RDF document. If current schemas are not sufficient to describe a
file, then new schemas can be created, as VAMP did with the creation of the
AVM schema [http://www.virtualastronomy.org/avm_metadata.php] to describe
astronomical images from NASA telescopes.
DISADVANTAGES OF XMP
------------------------------------------------------------------------------
The RDF Format
RDF describes a data graph in XML. Data graphs can be useful to describe
complex data, especially when all or some of the data is incomplete. RDF
parsers can then be used to query the XMP, with question such as “Was this
image taken by Spitzer Telescope?” and get a true / false response.
Unfortunately, the RDF graph has to be consumed in order to query it. This
requires downloading and reading all of the files that contain XMP in order
to query for the presence of a value. For example, if you want to ask the
question, “Which images were taken by Spitzer Telescope?” this would require
first ingesting all of the files that could possibly be in the answer set, and
whittling the set down to only the ones that are true for that value. This
procedure is inefficient and in many cases impossible for a simple query,
especially if the file size for the multimedia is significant. From my
experience thus far with RDF, it would be much more efficient to store the
RDF or metadata independent of the file, and include a pointer to
the RDF processor in the file instead. In fact, relational databases excel
at this type of operation, and have a long successful history of online,
standardized deployment. The decision to embed RDF inside the file poses a
technical challenge that makes simple data queries very expensive
for an otherwise routine technical implementation.
The XMP Implementation
Following the publication of the XMP standard, Adobe released an XMP SDK to
facilitate the reading and writing of XMP data into multimedia files.
Unfortunately, the SDK is written in C++, and support in other languages has
been slow to follow. There is a Perl package called EXIFTool that supports
reading and writing of XMP data, but it does not use the Adobe SDK and
inconsistencies are apparent between the implementations. There is no Ruby
wrapper that I know of, although a Python wrapper has recently been released.
RDF is also poorly understood as a subset of XML, which is one of the reasons
that Mozilla plans to drop RDF in deference to an embedded SQLite database as
a metadata storage mechanism in Firefox; as a result, many potential
developers are either turned off by the RDF implementation, or try to treat
it as looser XML, which is not consistent with RDF parsers. Widespread
adoption as Adobe pushes the standard could mitigate the difficulties of
implementing the XMP parsers; however, it is not an open standard, which is a
barrier among FOSS developers.
EXAMPLE USAGE
------------------------------------------------------------------------------
Install ExifTool, put the ".ExifTool_config in your user directory and
then you can read all of an image's xmp tags with:
exiftool -b -xmp filename
And you can write tags too (on one line):
exiftool -xmp-avm:Distance="far"
-xmp-avm:Subject.Category+="first"
-xmp-avm:Subject.Category+="second"
-xmp-iptcCore:CreatorContactInfoCiUrlWork="http://someplace"
filename
BUGS
------------------------------------------------------------------------------
There is at least one open bug whereby subsequent writes to the XMP data
will lose all of the tags that contain a period in their name. See this
forum for feedback:
http://www.cpanforum.com/posts/8512
REFERENCES:
------------------------------------------------------------------------------
The current Astronomy Visualization Metadata Standard:
http://www.virtualastronomy.org/avm_metadata.php
ExifTool:
http://www.sno.phy.queensu.ca/~phil/exiftool/
XMP according to Adobe:
http://www.adobe.com/products/xmp/