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 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344
|
#------------------------------------------------------------------------------
# File: Shortcuts.pm
#
# Description: ExifTool shortcut tags
#
# Revisions: 02/07/2004 - PH Moved out of Exif.pm
# 09/15/2004 - PH Added D70Boring from Greg Troxel
# 01/11/2005 - PH Added Canon20D from Christian Koller
# 03/03/2005 - PH Added user defined shortcuts
# 03/26/2005 - PH Added Nikon from Tom Christiansen
# 02/28/2007 - PH Removed model-dependent shortcuts
# --> this is what UserDefined::Shortcuts is for
# 02/25/2009 - PH Added Unsafe
# 07/03/2010 - PH Added CommonIFD0
#------------------------------------------------------------------------------
package Image::ExifTool::Shortcuts;
use strict;
use vars qw($VERSION);
$VERSION = '1.65';
# this is a special table used to define command-line shortcuts
# (documentation Notes may be added for these via %shortcutNotes in BuildTagLookup.pm)
%Image::ExifTool::Shortcuts::Main = (
# this shortcut allows the three common date/time tags to be shifted at once
AllDates => [
'DateTimeOriginal',
'CreateDate',
'ModifyDate',
],
# This is a shortcut to some common information which is useful in most images
Common => [
'FileName',
'FileSize',
'Model',
'DateTimeOriginal',
'ImageSize',
'Quality',
'FocalLength',
'ShutterSpeed',
'Aperture',
'ISO',
'WhiteBalance',
'Flash',
],
# This shortcut provides the same information as the Canon utilities
Canon => [
'FileName',
'Model',
'DateTimeOriginal',
'ShootingMode',
'ShutterSpeed',
'Aperture',
'MeteringMode',
'ExposureCompensation',
'ISO',
'Lens',
'FocalLength',
'ImageSize',
'Quality',
'Flash',
'FlashType',
'ConditionalFEC',
'RedEyeReduction',
'ShutterCurtainHack',
'WhiteBalance',
'FocusMode',
'Contrast',
'Sharpness',
'Saturation',
'ColorTone',
'ColorSpace',
'LongExposureNoiseReduction',
'FileSize',
'FileNumber',
'DriveMode',
'OwnerName',
'SerialNumber',
],
Nikon => [
'Model',
'SubSecDateTimeOriginal',
'ShutterCount',
'LensSpec',
'FocalLength',
'ImageSize',
'ShutterSpeed',
'Aperture',
'ISO',
'NoiseReduction',
'ExposureProgram',
'ExposureCompensation',
'WhiteBalance',
'WhiteBalanceFineTune',
'ShootingMode',
'Quality',
'MeteringMode',
'FocusMode',
'ImageOptimization',
'ToneComp',
'ColorHue',
'ColorSpace',
'HueAdjustment',
'Saturation',
'Sharpness',
'Flash',
'FlashMode',
'FlashExposureComp',
],
# This shortcut may be useful when copying tags between files to either
# copy the maker notes as a block or prevent it from being copied
MakerNotes => [
'MakerNotes', # (for RIFF MakerNotes)
'MakerNoteApple',
'MakerNoteCanon',
'MakerNoteCasio',
'MakerNoteCasio2',
'MakerNoteDJI',
'MakerNoteFLIR',
'MakerNoteFujiFilm',
'MakerNoteGE',
'MakerNoteGE2',
'MakerNoteHasselblad',
'MakerNoteHP',
'MakerNoteHP2',
'MakerNoteHP4',
'MakerNoteHP6',
'MakerNoteISL',
'MakerNoteJVC',
'MakerNoteJVCText',
'MakerNoteKodak1a',
'MakerNoteKodak1b',
'MakerNoteKodak2',
'MakerNoteKodak3',
'MakerNoteKodak4',
'MakerNoteKodak5',
'MakerNoteKodak6a',
'MakerNoteKodak6b',
'MakerNoteKodak7',
'MakerNoteKodak8a',
'MakerNoteKodak8b',
'MakerNoteKodak8c',
'MakerNoteKodak9',
'MakerNoteKodak10',
'MakerNoteKodak11',
'MakerNoteKodak12',
'MakerNoteKodakUnknown',
'MakerNoteKyocera',
'MakerNoteMinolta',
'MakerNoteMinolta2',
'MakerNoteMinolta3',
'MakerNoteMotorola',
'MakerNoteNikon',
'MakerNoteNikon2',
'MakerNoteNikon3',
'MakerNoteNintendo',
'MakerNoteOlympus',
'MakerNoteOlympus2',
'MakerNoteLeica',
'MakerNoteLeica2',
'MakerNoteLeica3',
'MakerNoteLeica4',
'MakerNoteLeica5',
'MakerNoteLeica6',
'MakerNoteLeica7',
'MakerNoteLeica8',
'MakerNoteLeica9',
'MakerNoteLeica10',
'MakerNotePanasonic',
'MakerNotePanasonic2',
'MakerNotePanasonic3',
'MakerNotePentax',
'MakerNotePentax2',
'MakerNotePentax3',
'MakerNotePentax4',
'MakerNotePentax5',
'MakerNotePentax6',
'MakerNotePhaseOne',
'MakerNoteReconyx',
'MakerNoteReconyx2',
'MakerNoteReconyx3',
'MakerNoteRicoh',
'MakerNoteRicoh2',
'MakerNoteRicohPentax',
'MakerNoteRicohText',
'MakerNoteSamsung1a',
'MakerNoteSamsung1b',
'MakerNoteSamsung2',
'MakerNoteSanyo',
'MakerNoteSanyoC4',
'MakerNoteSanyoPatch',
'MakerNoteSigma',
'MakerNoteSony',
'MakerNoteSony2',
'MakerNoteSony3',
'MakerNoteSony4',
'MakerNoteSony5',
'MakerNoteSonyEricsson',
'MakerNoteSonySRF',
'MakerNoteUnknownText',
'MakerNoteUnknownBinary',
'MakerNoteUnknown',
],
# "unsafe" tags we normally don't copy in JPEG images, defined
# as a shortcut to use when rebuilding JPEG EXIF from scratch
Unsafe => [
'IFD0:YCbCrPositioning',
'IFD0:YCbCrCoefficients',
'IFD0:TransferFunction',
'ExifIFD:ComponentsConfiguration',
'ExifIFD:CompressedBitsPerPixel',
'InteropIFD:InteropIndex',
'InteropIFD:InteropVersion',
'InteropIFD:RelatedImageWidth',
'InteropIFD:RelatedImageHeight',
],
# standard tags used to define the color space of an image
# (useful to preserve color space when deleting all meta information)
ColorSpaceTags => [
'ExifIFD:ColorSpace',
'ExifIFD:Gamma',
'InteropIFD:InteropIndex',
'ICC_Profile',
],
# common metadata tags found in IFD0 of TIFF images
CommonIFD0 => [
# standard EXIF
'IFD0:ImageDescription',
'IFD0:Make',
'IFD0:Model',
'IFD0:Software',
'IFD0:ModifyDate',
'IFD0:Artist',
'IFD0:Copyright',
# other TIFF tags
'IFD0:Rating',
'IFD0:RatingPercent',
'IFD0:DNGLensInfo',
'IFD0:PanasonicTitle',
'IFD0:PanasonicTitle2',
'IFD0:XPTitle',
'IFD0:XPComment',
'IFD0:XPAuthor',
'IFD0:XPKeywords',
'IFD0:XPSubject',
],
# large binary data tags which won't be loaded if excluded when extracting
LargeTags => [
'CanonVRD',
'DLOData',
'EXIF',
'ICC_Profile',
'IDCPreviewImage',
'ImageData',
'IPTC',
'JpgFromRaw',
'OriginalRawImage',
'OtherImage',
'PreviewImage',
'ThumbnailImage',
'TIFFPreview',
'XML',
'XMP',
'ZoomedPreviewImage',
],
);
#------------------------------------------------------------------------------
# load user-defined shortcuts if available
# Inputs: reference to user-defined shortcut hash
sub LoadShortcuts($)
{
my $shortcuts = shift;
my $shortcut;
foreach $shortcut (keys %$shortcuts) {
my $val = $$shortcuts{$shortcut};
# also allow simple aliases
$val = [ $val ] unless ref $val eq 'ARRAY';
# save the user-defined shortcut or alias
$Image::ExifTool::Shortcuts::Main{$shortcut} = $val;
}
}
# (for backward compatibility, renamed in ExifTool 7.75)
if (%Image::ExifTool::Shortcuts::UserDefined) {
LoadShortcuts(\%Image::ExifTool::Shortcuts::UserDefined);
}
if (%Image::ExifTool::UserDefined::Shortcuts) {
LoadShortcuts(\%Image::ExifTool::UserDefined::Shortcuts);
}
1; # end
__END__
=head1 NAME
Image::ExifTool::Shortcuts - ExifTool shortcut tags
=head1 SYNOPSIS
This module is required by Image::ExifTool.
=head1 DESCRIPTION
This module contains definitions for tag name shortcuts used by
Image::ExifTool. You can customize this file to add your own shortcuts.
Individual users may also add their own shortcuts to the .ExifTool_config
file in their home directory (or the directory specified by the
EXIFTOOL_HOME environment variable). The shortcuts are defined in a hash
called %Image::ExifTool::UserDefined::Shortcuts. The keys of the hash are
the shortcut names, and the elements are either tag names or references to
lists of tag names.
An example shortcut definition in .ExifTool_config:
%Image::ExifTool::UserDefined::Shortcuts = (
MyShortcut => ['createdate','exif:exposuretime','aperture'],
MyAlias => 'FocalLengthIn35mmFormat',
);
In this example, MyShortcut is a shortcut for the CreateDate,
EXIF:ExposureTime and Aperture tags, and MyAlias is a shortcut for
FocalLengthIn35mmFormat.
The target tag names may contain an optional group name prefix. A group
name applied to the shortcut will be ignored for any target tag with a group
name prefix.
=head1 AUTHOR
Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=head1 SEE ALSO
L<Image::ExifTool(3pm)|Image::ExifTool>
=cut
|