~ubuntu-branches/ubuntu/karmic/libimage-exiftool-perl/karmic

« back to all changes in this revision

Viewing changes to lib/Image/ExifTool/BuildTagLookup.pm

  • Committer: Bazaar Package Importer
  • Author(s): Mari Wang
  • Date: 2008-02-04 20:32:53 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080204203253-mpbal8trlfe1fz5d
Tags: 7.00-1
* Upload of new production release (Closes: #456430)
* Added Recommends: libcompress-zlib-perl (Closes: #435589)
* Package now includes iptc2xmp.args and xmp2iptc.args, they are put
  into /usr/share/libimage-exiftool/ (Closes: #436100)
* Updated standards-version (3.7.2 -> 3.7.3). No changes needed.
* Lots of updates and bugfixes compared to last debian version
  (6.90).  See the Changes file for details
* Upload sponsored by Petter Reinholdtsen

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
use Image::ExifTool::Shortcuts;
27
27
use Image::ExifTool::HTML qw(EscapeHTML);
28
28
use Image::ExifTool::IPTC;
 
29
use Image::ExifTool::Canon;
29
30
use Image::ExifTool::Nikon;
30
 
use Image::ExifTool::Real;
31
31
 
32
 
$VERSION = '1.56';
 
32
$VERSION = '1.59';
33
33
@ISA = qw(Exporter);
34
34
 
35
35
sub NumbersFirst;
66
66
The tables listed below give the names of all tags recognized by ExifTool.
67
67
},
68
68
    ExifTool2 => q{
69
 
A B<Tag ID> or B<Index> is given in the first column of each table.  A
70
 
B<Tag ID> is the computer-readable equivalent of a tag name, and is the
71
 
identifier that is actually stored in the file.  An B<Index> refers to the
72
 
location of the information, and is used if the information is stored at a
73
 
fixed position in a data block.
 
69
B<Tag ID>, B<Index> or B<Sequence> is given in the first column of each
 
70
table.  A B<Tag ID> is the computer-readable equivalent of a tag name, and
 
71
is the identifier that is actually stored in the file.  An B<Index> refers
 
72
to the location of a value when found at a fixed position within a data
 
73
block, and B<Sequence> gives the order of values for a serial data stream.
74
74
 
75
75
A B<Tag Name> is the handle by which the information is accessed in
76
76
ExifTool.  In some instances, more than one name may correspond to a single
150
150
XMP stands for "Extensible Metadata Platform", an XML/RDF-based metadata
151
151
format which is being pushed by Adobe.  Information in this format can be
152
152
embedded in many different image file types including JPG, JP2, TIFF, PNG,
153
 
MIFF, PS, PDF, PSD and DNG.
 
153
MIFF, PS, PDF, PSD and DNG, as well as audio file formats supporting ID3v2
 
154
information.
154
155
 
155
156
The XMP B<Tag ID>'s aren't listed because in most cases they are identical
156
157
to the B<Tag Name>.
161
162
C<rational> is two C<integer> strings separated by a '/' character, C<date>
162
163
is a date/time string in the format "YYYY:MM:DD HH:MM:SS[+/-HH:MM]",
163
164
C<boolean> is either "True" or "False", and C<lang-alt> is a list of string
164
 
alternatives in different languages. Currently, ExifTool only writes the
165
 
"x-default" language in C<lang-alt> lists.
 
165
alternatives in different languages.
 
166
 
 
167
Individual languages for C<lang-alt> tags are accessed by suffixing the tag
 
168
name with a '-', followed by an RFC 3066 language code (ie. "XMP:Title-fr",
 
169
or "Rights-en-US").  A C<lang-alt> tag with no language code accesses the
 
170
"x-default" language, but causes other languages to be deleted when writing.
 
171
The "x-default" language code may be specified when writing a new value to
 
172
write only the default language, but note that all languages are still
 
173
deleted if "x-default" tag is deleted.  When reading, "x-default" is not
 
174
specified.
166
175
 
167
176
The XMP tags are organized according to schema B<Namespace> in the following
168
177
tables.  Note that a few of the longer namespace prefixes given below have
391
400
        # save all tag names
392
401
        my ($tagID, $binaryTable, $noID, $isIPTC);
393
402
        $isIPTC = 1 if $$table{WRITE_PROC} and $$table{WRITE_PROC} eq \&Image::ExifTool::IPTC::WriteIPTC;
394
 
        $noID = 1 if $short =~ /^(Composite|XMP|Extra|Shortcuts|ASF.*)$/;
395
 
        if ($table->{PROCESS_PROC} and
396
 
           ($table->{PROCESS_PROC} eq \&Image::ExifTool::ProcessBinaryData or
397
 
            $table->{PROCESS_PROC} eq \&Image::ExifTool::Real::ProcessSerialData))
 
403
        $noID = 1 if $short =~ /^(Composite|XMP|Extra|Shortcuts|ASF.*)$/ or $table->{VARS}->{NO_ID};
 
404
        if (($table->{VARS} and $table->{VARS}->{INDEX}) or
 
405
            ($table->{PROCESS_PROC} and
 
406
             $table->{PROCESS_PROC} eq \&Image::ExifTool::ProcessBinaryData))
398
407
        {
399
408
            $binaryTable = 1;
400
409
            $id{$tableName} = 'Index';
 
410
        } elsif ($table->{PROCESS_PROC} and
 
411
            $table->{PROCESS_PROC} eq \&Image::ExifTool::Canon::ProcessSerialData)
 
412
        {
 
413
            $binaryTable = 1;
 
414
            $id{$tableName} = 'Sequence';
401
415
        } elsif ($isIPTC and $$table{PROCESS_PROC}) { #only the main IPTC table has a PROCESS_PROC
402
416
            $id{$tableName} = 'Record';
403
417
        } elsif (not $noID) {
850
864
    $doc =~ s/\n\n/<\/p>\n\n<p>/g;
851
865
    $doc =~ s/B&lt;(.*?)&gt;/<b>$1<\/b>/sg;
852
866
    $doc =~ s/C&lt;(.*?)&gt;/<code>$1<\/code>/sg;
 
867
    $doc =~ s/L&lt;(.*?)&gt;/<a href="$1">$1<\/a>/sg;
853
868
    return $doc;
854
869
}
855
870
 
1279
1294
                $wTag = $longTag;
1280
1295
                warn "Notice: Long tags in $tableName table\n";
1281
1296
            }
1282
 
        } elsif ($short =~ /^(Extra|XMP|ASF)/) {
 
1297
        } elsif ($short !~ /^(Composite|Shortcuts)/) {
1283
1298
            $wTag += 9;
1284
1299
            $hid = '';
1285
1300
        } else {
1309
1324
        $line .= sprintf " %-${wGrp}s", 'Group' if $showGrp;
1310
1325
        $line .= ' Writable';
1311
1326
        print PODFILE $line;
 
1327
        $line =~ s/Sequence /Sequence\t/;   # don't want an underline after 'Sequence'
1312
1328
        $line =~ s/\S/-/g;
1313
1329
        $line =~ s/- -/---/g;
 
1330
        $line =~ tr/\t/ /;
1314
1331
        print PODFILE $line,"\n";
1315
1332
        close HTMLFILE;
1316
1333
        OpenHtmlFile($htmldir, $short) or $success = 0;