source: gsdl/trunk/perllib/cpan/Image/ExifTool/Shortcuts.pm@ 16842

Last change on this file since 16842 was 16842, checked in by davidb, 16 years ago

ExifTool added to cpan area to support metadata extraction from files such as JPEG. Primarily targetted as Image files (hence the Image folder name decided upon by the ExifTool author) it also can handle video such as flash and audio such as Wav

File size: 6.8 KB
Line 
1#------------------------------------------------------------------------------
2# File: Shortcuts.pm
3#
4# Description: ExifTool shortcut tags
5#
6# Revisions: 02/07/2004 - P. Harvey Moved out of Exif.pm
7# 09/15/2004 - P. Harvey Added D70Boring from Greg Troxel
8# 01/11/2005 - P. Harvey Added Canon20D from Christian Koller
9# 03/03/2005 - P. Harvey Added user defined shortcuts
10# 03/26/2005 - P. Harvey Added Nikon from Tom Christiansen
11#------------------------------------------------------------------------------
12
13package Image::ExifTool::Shortcuts;
14
15use strict;
16use vars qw($VERSION);
17
18$VERSION = '1.16';
19
20# this is a special table used to define command-line shortcuts
21%Image::ExifTool::Shortcuts::Main = (
22 # this shortcut allows the three common date/time tags to be shifted at once
23 AllDates => [
24 'DateTimeOriginal',
25 'CreateDate',
26 'ModifyDate',
27 ],
28 # This is a shortcut to some common information which is useful in most images
29 Common => [
30 'FileName',
31 'FileSize',
32 'Model',
33 'DateTimeOriginal',
34 'ImageSize',
35 'Quality',
36 'FocalLength',
37 'ShutterSpeed',
38 'Aperture',
39 'ISO',
40 'WhiteBalance',
41 'Flash',
42 ],
43 # This shortcut provides the same information as the Canon utilities
44 Canon => [
45 'FileName',
46 'Model',
47 'DateTimeOriginal',
48 'ShootingMode',
49 'ShutterSpeed',
50 'Aperture',
51 'MeteringMode',
52 'ExposureCompensation',
53 'ISO',
54 'Lens',
55 'FocalLength',
56 'ImageSize',
57 'Quality',
58 'FlashOn',
59 'FlashType',
60 'ConditionalFEC',
61 'RedEyeReduction',
62 'ShutterCurtainHack',
63 'WhiteBalance',
64 'FocusMode',
65 'Contrast',
66 'Sharpness',
67 'Saturation',
68 'ColorTone',
69 'FileSize',
70 'FileNumber',
71 'DriveMode',
72 'OwnerName',
73 'SerialNumber',
74 ],
75 # courtesy of Christian Koller
76 Canon20D => [
77 'FileName',
78 'Model',
79 'DateTimeOriginal',
80 'ShootingMode',
81 'ShutterSpeedValue', #changed for 20D
82 'ApertureValue', #changed for 20D
83 'MeteringMode',
84 'ExposureCompensation',
85 'ISO',
86 'Lens',
87 'FocalLength',
88 #'ImageSize', #wrong in CR2
89 'ExifImageWidth', #instead
90 'ExifImageLength', #instead
91 'Quality',
92 'FlashOn',
93 'FlashType',
94 'ConditionalFEC',
95 'RedEyeReduction',
96 'ShutterCurtainHack',
97 'WhiteBalance',
98 'FocusMode',
99 'Contrast',
100 'Sharpness',
101 'Saturation',
102 'ColorTone',
103 'ColorSpace', # new
104 'LongExposureNoiseReduction', #new
105 'FileSize',
106 'FileNumber',
107 'DriveMode',
108 'OwnerName',
109 'SerialNumber',
110 ],
111 Nikon => [
112 'Model',
113 'SubSecDateTimeOriginal',
114 'ShutterCount',
115 'LensSpec',
116 'FocalLength',
117 'ImageSize',
118 'ShutterSpeed',
119 'Aperture',
120 'ISO',
121 'NoiseReduction',
122 'ExposureProgram',
123 'ExposureCompensation',
124 'WhiteBalance',
125 'WhiteBalanceFineTune',
126 'ShootingMode',
127 'Quality',
128 'MeteringMode',
129 'FocusMode',
130 'ImageOptimization',
131 'ToneComp',
132 'ColorHue',
133 'ColorSpace',
134 'HueAdjustment',
135 'Saturation',
136 'Sharpness',
137 'Flash',
138 'FlashMode',
139 'FlashExposureComp',
140 ],
141 # This shortcut may be useful when copying tags between files to either
142 # copy the maker notes as a block or prevent it from being copied
143 MakerNotes => [
144 'MakerNotes', # (for RIFF MakerNotes)
145 'MakerNoteCanon',
146 'MakerNoteCasio',
147 'MakerNoteCasio2',
148 'MakerNoteFujiFilm',
149 'MakerNoteHP',
150 'MakerNoteHP2',
151 'MakerNoteHP4',
152 'MakerNoteHP6',
153 'MakerNoteJVC',
154 'MakerNoteJVCText',
155 'MakerNoteKodak1a',
156 'MakerNoteKodak1b',
157 'MakerNoteKodak2',
158 'MakerNoteKodak3',
159 'MakerNoteKodak4',
160 'MakerNoteKodak5',
161 'MakerNoteKodak6a',
162 'MakerNoteKodak6b',
163 'MakerNoteKodak7',
164 'MakerNoteKodakIFD',
165 'MakerNoteKodakUnknown',
166 'MakerNoteKyocera',
167 'MakerNoteMinolta',
168 'MakerNoteMinolta2',
169 'MakerNoteMinolta3',
170 'MakerNoteNikon',
171 'MakerNoteNikon2',
172 'MakerNoteNikon3',
173 'MakerNoteOlympus',
174 'MakerNoteOlympus2',
175 'MakerNoteLeica',
176 'MakerNotePanasonic',
177 'MakerNotePanasonic2',
178 'MakerNotePentax',
179 'MakerNotePentax2',
180 'MakerNotePentax3',
181 'MakerNotePentax4',
182 'MakerNoteRicoh',
183 'MakerNoteRicohText',
184 'MakerNoteSanyo',
185 'MakerNoteSanyoC4',
186 'MakerNoteSanyoPatch',
187 'MakerNoteSigma',
188 'MakerNoteSony',
189 'MakerNoteSonySRF',
190 'MakerNoteSonySR2',
191 'MakerNoteUnknown',
192 ],
193);
194
195# load user-defined shortcuts if available
196if (defined %Image::ExifTool::Shortcuts::UserDefined) {
197 my $shortcut;
198 foreach $shortcut (keys %Image::ExifTool::Shortcuts::UserDefined) {
199 my $val = $Image::ExifTool::Shortcuts::UserDefined{$shortcut};
200 # also allow simple aliases
201 $val = [ $val ] unless ref $val eq 'ARRAY';
202 # save the user-defined shortcut or alias
203 $Image::ExifTool::Shortcuts::Main{$shortcut} = $val;
204 }
205}
206
207
2081; # end
209
210__END__
211
212=head1 NAME
213
214Image::ExifTool::Shortcuts - ExifTool shortcut tags
215
216=head1 SYNOPSIS
217
218This module is required by Image::ExifTool.
219
220=head1 DESCRIPTION
221
222This module contains definitions for tag name shortcuts used by
223Image::ExifTool. You can customize this file to add your own shortcuts.
224
225Individual users may also add their own shortcuts to the .ExifTool_config
226file in their home directory (or the directory specified by the
227EXIFTOOL_HOME environment variable). The shortcuts are defined in a hash
228called %Image::ExifTool::Shortcuts::UserDefined. The keys of the hash are
229the shortcut names, and the elements are either tag names or references to
230lists of tag names.
231
232An example shortcut definition in .ExifTool_config:
233
234 %Image::ExifTool::Shortcuts::UserDefined = (
235 MyShortcut => ['createdate','exif:exposuretime','aperture'],
236 MyAlias => 'FocalLengthIn35mmFormat',
237 );
238
239In this example, MyShortcut is a shortcut for the CreateDate,
240EXIF:ExposureTime and Aperture tags, and MyAlias is a shortcut for
241FocalLengthIn35mmFormat.
242
243=head1 AUTHOR
244
245Copyright 2003-2007, Phil Harvey (phil at owl.phy.queensu.ca)
246
247This library is free software; you can redistribute it and/or modify it
248under the same terms as Perl itself.
249
250=head1 SEE ALSO
251
252L<Image::ExifTool(3pm)|Image::ExifTool>
253
254=cut
Note: See TracBrowser for help on using the repository browser.