1Image::ExifTool(3)    User Contributed Perl Documentation   Image::ExifTool(3)
2
3
4

NAME

6       Image::ExifTool - Read and write meta information
7

SYNOPSIS

9         use Image::ExifTool qw(:Public);
10
11         # ---- Simple procedural usage ----
12
13         # Get hash of meta information tag names/values from an image
14         $info = ImageInfo('a.jpg');
15
16         # ---- Object-oriented usage ----
17
18         # Create a new Image::ExifTool object
19         $exifTool = new Image::ExifTool;
20
21         # Extract meta information from an image
22         $exifTool->ExtractInfo($file, \%options);
23
24         # Get list of tags in the order they were found in the file
25         @tagList = $exifTool->GetFoundTags('File');
26
27         # Get the value of a specified tag
28         $value = $exifTool->GetValue($tag, $type);
29
30         # Get a tag description
31         $description = $exifTool->GetDescription($tag);
32
33         # Get the group name associated with this tag
34         $group = $exifTool->GetGroup($tag, $family);
35
36         # Set a new value for a tag
37         $exifTool->SetNewValue($tag, $newValue);
38
39         # Write new meta information to a file
40         $success = $exifTool->WriteInfo($srcfile, $dstfile);
41
42         # ...plus a host of other useful methods...
43

DESCRIPTION

45       Reads and writes meta information in a wide variety of files, including
46       the maker notes of many digital cameras by various manufacturers such
47       as Canon, Casio, DJI, FLIR, FujiFilm, GE, GoPro, HP, JVC/Victor, Kodak,
48       Leaf, Minolta/Konica-Minolta, Nikon, Nintendo, Olympus/Epson,
49       Panasonic/Leica, Pentax/Asahi, Phase One, Reconyx, Ricoh, Samsung,
50       Sanyo, Sigma/Foveon and Sony.
51
52       Below is a list of file types and meta information formats currently
53       supported by ExifTool (r = read, w = write, c = create):
54
55         File Types
56         ------------+-------------+-------------+-------------+------------
57         3FR   r     | DSS   r     | J2C   r     | ODS   r     | RSRC  r
58         3G2   r/w   | DV    r     | JNG   r/w   | ODT   r     | RTF   r
59         3GP   r/w   | DVB   r/w   | JP2   r/w   | OFR   r     | RW2   r/w
60         A     r     | DVR-MS r    | JPEG  r/w   | OGG   r     | RWL   r/w
61         AA    r     | DYLIB r     | JSON  r     | OGV   r     | RWZ   r
62         AAE   r     | EIP   r     | K25   r     | OPUS  r     | RM    r
63         AAX   r/w   | EPS   r/w   | KDC   r     | ORF   r/w   | SEQ   r
64         ACR   r     | EPUB  r     | KEY   r     | OTF   r     | SKETCH r
65         AFM   r     | ERF   r/w   | LA    r     | PAC   r     | SO    r
66         AI    r/w   | EXE   r     | LFP   r     | PAGES r     | SR2   r/w
67         AIFF  r     | EXIF  r/w/c | LNK   r     | PBM   r/w   | SRF   r
68         APE   r     | EXR   r     | LRV   r/w   | PCD   r     | SRW   r/w
69         ARQ   r/w   | EXV   r/w/c | M2TS  r     | PCX   r     | SVG   r
70         ARW   r/w   | F4A/V r/w   | M4A/V r/w   | PDB   r     | SWF   r
71         ASF   r     | FFF   r/w   | MAX   r     | PDF   r/w   | THM   r/w
72         AVI   r     | FITS  r     | MEF   r/w   | PEF   r/w   | TIFF  r/w
73         AVIF  r/w   | FLA   r     | MIE   r/w/c | PFA   r     | TORRENT r
74         AZW   r     | FLAC  r     | MIFF  r     | PFB   r     | TTC   r
75         BMP   r     | FLIF  r/w   | MKA   r     | PFM   r     | TTF   r
76         BPG   r     | FLV   r     | MKS   r     | PGF   r     | TXT   r
77         BTF   r     | FPF   r     | MKV   r     | PGM   r/w   | VCF   r
78         CHM   r     | FPX   r     | MNG   r/w   | PLIST r     | VRD   r/w/c
79         COS   r     | GIF   r/w   | MOBI  r     | PICT  r     | VSD   r
80         CR2   r/w   | GPR   r/w   | MODD  r     | PMP   r     | WAV   r
81         CR3   r/w   | GZ    r     | MOI   r     | PNG   r/w   | WDP   r/w
82         CRM   r/w   | HDP   r/w   | MOS   r/w   | PPM   r/w   | WEBP  r
83         CRW   r/w   | HDR   r     | MOV   r/w   | PPT   r     | WEBM  r
84         CS1   r/w   | HEIC  r/w   | MP3   r     | PPTX  r     | WMA   r
85         DCM   r     | HEIF  r/w   | MP4   r/w   | PS    r/w   | WMV   r
86         DCP   r/w   | HTML  r     | MPC   r     | PSB   r/w   | WTV   r
87         DCR   r     | ICC   r/w/c | MPG   r     | PSD   r/w   | WV    r
88         DFONT r     | ICS   r     | MPO   r/w   | PSP   r     | X3F   r/w
89         DIVX  r     | IDML  r     | MQV   r/w   | QTIF  r/w   | XCF   r
90         DJVU  r     | IIQ   r/w   | MRW   r/w   | R3D   r     | XLS   r
91         DLL   r     | IND   r/w   | MXF   r     | RA    r     | XLSX  r
92         DNG   r/w   | INSP  r/w   | NEF   r/w   | RAF   r/w   | XMP   r/w/c
93         DOC   r     | INSV  r     | NRW   r/w   | RAM   r     | ZIP   r
94         DOCX  r     | INX   r     | NUMBERS r   | RAR   r     |
95         DPX   r     | ISO   r     | O     r     | RAW   r/w   |
96         DR4   r/w/c | ITC   r     | ODP   r     | RIFF  r     |
97
98         Meta Information
99         ----------------------+----------------------+---------------------
100         EXIF           r/w/c  |  CIFF           r/w  |  Ricoh RMETA    r
101         GPS            r/w/c  |  AFCP           r/w  |  Picture Info   r
102         IPTC           r/w/c  |  Kodak Meta     r/w  |  Adobe APP14    r
103         XMP            r/w/c  |  FotoStation    r/w  |  MPF            r
104         MakerNotes     r/w/c  |  PhotoMechanic  r/w  |  Stim           r
105         Photoshop IRB  r/w/c  |  JPEG 2000      r    |  DPX            r
106         ICC Profile    r/w/c  |  DICOM          r    |  APE            r
107         MIE            r/w/c  |  Flash          r    |  Vorbis         r
108         JFIF           r/w/c  |  FlashPix       r    |  SPIFF          r
109         Ducky APP12    r/w/c  |  QuickTime      r    |  DjVu           r
110         PDF            r/w/c  |  Matroska       r    |  M2TS           r
111         PNG            r/w/c  |  MXF            r    |  PE/COFF        r
112         Canon VRD      r/w/c  |  PrintIM        r    |  AVCHD          r
113         Nikon Capture  r/w/c  |  FLAC           r    |  ZIP            r
114         GeoTIFF        r/w/c  |  ID3            r    |  (and more)
115

CONFIGURATION

117       User-defined tags can be added via the ExifTool configuration file, or
118       by defining the %Image::ExifTool::UserDefined hash before calling any
119       ExifTool methods.  See "ExifTool_config" in the ExifTool distribution
120       for more details.
121
122       By default ExifTool looks for a configuration file named
123       ".ExifTool_config" first in your home directory, then in the directory
124       of the application script, but a different directory may be specified
125       by setting the EXIFTOOL_HOME environment variable, or a different file
126       may be specified by setting the ExifTool "configFile" variable before
127       using Image::ExifTool.  For example:
128
129           BEGIN { $Image::ExifTool::configFile = '/Users/phil/myconfig.cfg' }
130           use Image::ExifTool;
131
132       The configuration feature may also be disabled by setting "configFile"
133       to an empty string:
134
135           BEGIN { $Image::ExifTool::configFile = '' }
136           use Image::ExifTool;
137

EXPORTS

139       Exports nothing by default, but "ImageInfo" and all static methods may
140       be exported with the ":Public" export list.
141

METHODS

143       All ExifTool features are accessed through the methods of the public
144       interface listed below.  Other Image::ExifTool methods and modules
145       should not be accessed directly because their interface may change with
146       future versions.
147
148       None of these methods should ever die or issue warnings to STDERR if
149       called with the proper arguments (with the exception of "SetNewValue"
150       which may send an error message to STDERR, but only when called in
151       scalar context).  Error and warning messages that occur during
152       processing are stored in the values of the Error and Warning tags, and
153       are accessible via the "GetValue" method to retrieve a single Error or
154       Warning message, or "GetInfo" to retrieve any number of them.
155
156       The ExifTool methods are not thread safe.
157
158   new
159       Creates a new ExifTool object.
160
161           $exifTool = new Image::ExifTool;
162
163       Note that ExifTool uses AUTOLOAD to load non-member methods, so any
164       class using Image::ExifTool as a base class must define an AUTOLOAD
165       which calls Image::ExifTool::DoAutoLoad().  eg)
166
167           sub AUTOLOAD
168           {
169               Image::ExifTool::DoAutoLoad($AUTOLOAD, @_);
170           }
171
172   ImageInfo
173       Read image file and return meta information.  This is the one step
174       function for retrieving meta information from an image.  Internally,
175       "ImageInfo" calls "ExtractInfo" to extract the information, "GetInfo"
176       to generate the information hash, and "GetTagList" for the returned tag
177       list.
178
179           # return meta information for 2 tags only (procedural)
180           $info = ImageInfo($filename, $tag1, $tag2);
181
182           # return information about an open image file (object-oriented)
183           $info = $exifTool->ImageInfo(\*FILE);
184
185           # return information from image data in memory for specified tags
186           %options = (PrintConv => 0);
187           @tagList = qw(filename imagesize xmp:creator exif:* -ifd1:*);
188           $info = ImageInfo(\$imageData, \@tagList, \%options);
189
190           # extract information from an embedded thumbnail image
191           $info = ImageInfo('image.jpg', 'thumbnailimage');
192           $thumbInfo = ImageInfo($$info{ThumbnailImage});
193
194       Inputs:
195           "ImageInfo" is very flexible about the input arguments, and
196           interprets them based on their type.  It may be called with one or
197           more arguments.  The one required argument is either a SCALAR (the
198           image file name), a file reference (a reference to the image file)
199           or a SCALAR reference (a reference to the image in memory).  Other
200           arguments are optional.  The order of the arguments is not
201           significant, except that the first SCALAR is taken to be the file
202           name unless a file reference or scalar reference comes earlier in
203           the argument list.
204
205           Below is an explanation of how the "ImageInfo" function arguments
206           are interpreted:
207
208           ExifTool ref
209               "ImageInfo" may be called with an ExifTool object if desired.
210               Advantages of using the object-oriented form are that options
211               may be set before calling "ImageInfo", and the object may be
212               used afterward to access member functions.  Must be the first
213               argument if used.
214
215           SCALAR
216               The first scalar argument is taken to be the file name unless
217               an earlier argument specified the image data via a file
218               reference (file ref) or data reference (SCALAR ref).  The
219               remaining scalar arguments are names of tags for requested
220               information.  All tags are returned if no tags are specified.
221
222               Tag names are case-insensitive and may be prefixed by optional
223               group names separated by colons.  A group name may begin with a
224               family number (eg.  '1IPTC:Keywords'), to restrict matches to a
225               specific family.  In the tag name, a '?' matches any single
226               character and a '*' matches zero or more characters.  Thus
227               'GROUP:*' represents all tags in a specific group.  Wildcards
228               may not be used in group names, with the exception that a group
229               name of '*' may be used to extract all available instances of a
230               tag regardless of the "Duplicates" setting (eg.
231               '*:WhiteBalance').  Multiple groups may be specified (eg.
232               'EXIF:Time:*' extracts all EXIF Time tags). And finally, a
233               leading '-' indicates a tag to be excluded (eg. '-IFD1:*'), or
234               a trailing '#' causes the ValueConv value to be returned for
235               this tag.
236
237               Note that keys in the returned information hash and elements of
238               the returned tag list are not necessarily the same as these tag
239               names because group names are removed, the case may be changed,
240               and an instance number may be added.  For this reason it is
241               best to use either the keys of the returned hash or the
242               elements of the returned tag list when accessing the tag
243               values.
244
245               See Image::ExifTool::TagNames for a complete list of ExifTool
246               tag names.
247
248           File ref
249               A reference to an open image file.  If you use this method (or
250               a SCALAR reference) to access information in an image, the
251               FileName and Directory tags will not be returned.  (Also, a
252               number of the File System tags will not be returned unless it
253               is a plain file.)  Image processing begins at the current file
254               position, and on return the file position is unspecified.  May
255               be either a standard filehandle, or a reference to a
256               File::RandomAccess object.  Note that the file remains open and
257               must be closed by the caller after "ImageInfo" returns.
258
259               [Advanced:  To allow a non-rewindable stream (eg. a network
260               socket) to be re-read after processing with ExifTool, first
261               wrap the file reference in a File::RandomAccess object, then
262               pass this object to "ImageInfo".  The File::RandomAccess object
263               will buffer the file if necessary, and may be used to re-read
264               the file after "ImageInfo" returns.]
265
266           SCALAR ref
267               A reference to image data in memory.
268
269           ARRAY ref
270               Reference to a list of tag names.  On entry, any elements in
271               the list are added to the list of requested tags.  Tags with
272               names beginning with '-' are excluded.  On return, this list is
273               updated to contain an ordered list of tag keys for the returned
274               information.
275
276               There will be 1:1 correspondence between the requested tags and
277               the returned tag keys only if the "Duplicates" option is 0 and
278               "Sort" is 'Input'.  (With "Duplicates" enabled, there may be
279               more entries in the returned list of tag keys, and with other
280               "Sort" settings the entries may not be in the same order as
281               requested.)  If a requested tag doesn't exist, a tag key is
282               still generated, but the tag value is undefined.
283
284           HASH ref
285               Reference to a hash containing the options settings valid for
286               this call only.  See "Options" documentation below for a list
287               of available options.  Options specified as arguments to
288               "ImageInfo" take precedence over "Options" settings.
289
290       Return Values:
291           "ImageInfo" returns a reference to a hash of tag key/value pairs.
292           The tag keys are identifiers -- essentially case-sensitive tag
293           names with an appended instance number if multiple tags with the
294           same name were extracted from the image.  Many of the ExifTool
295           functions require a tag key as an argument.  Use "GetTagName
296           [static]" to get the tag name for a given tag key.  Note that the
297           case of the tag names may not be the same as requested.  Here is a
298           simple example to print out the information returned by
299           "ImageInfo":
300
301               foreach (sort keys %$info) {
302                   print "$_ => $$info{$_}\n";
303               }
304
305           Values of the returned hash are usually simple scalars, but a
306           scalar reference is used to indicate binary data and an array
307           reference may be used to indicate a list.  Also, a hash reference
308           may be returned if the "Struct" option is used.  Lists of values
309           are joined by commas into a single string only if the PrintConv
310           option is enabled and the ListJoin option is enabled (which are the
311           defaults).  Note that binary values are not necessarily extracted
312           unless specifically requested, or the Binary option is enabled and
313           the tag is not specifically excluded.  If not extracted the value
314           is a reference to a string of the form "Binary data ##### bytes".
315
316           The code below gives an example of how to handle these return
317           values, as well as illustrating the use of other ExifTool
318           functions:
319
320               use Image::ExifTool;
321               my $exifTool = new Image::ExifTool;
322               $exifTool->Options(Unknown => 1);
323               my $info = $exifTool->ImageInfo('a.jpg');
324               my $group = '';
325               my $tag;
326               foreach $tag ($exifTool->GetFoundTags('Group0')) {
327                   if ($group ne $exifTool->GetGroup($tag)) {
328                       $group = $exifTool->GetGroup($tag);
329                       print "---- $group ----\n";
330                   }
331                   my $val = $info->{$tag};
332                   if (ref $val eq 'SCALAR') {
333                       if ($$val =~ /^Binary data/) {
334                           $val = "($$val)";
335                       } else {
336                           my $len = length($$val);
337                           $val = "(Binary data $len bytes)";
338                       }
339                   }
340                   printf("%-32s : %s\n", $exifTool->GetDescription($tag), $val);
341               }
342
343       Notes:
344           ExifTool returns all values as byte strings of encoded characters.
345           Perl wide characters are not used.  See "CHARACTER ENCODINGS" for
346           details about the encodings.  By default, most returned values are
347           encoded in UTF-8.  For these, Encode::decode_utf8() may be used to
348           convert to a sequence of logical Perl characters.
349
350           As well as tags representing information extracted from the image,
351           the following Extra tags generated by ExifTool may be returned:
352
353               ExifToolVersion - The ExifTool version number.
354
355               Error - An error message if the image could not be processed.
356
357               Warning - A warning message if problems were encountered while
358                         processing the image.
359
360   Options
361       Get/set ExifTool options.  This function can be called to set the
362       default options for an ExifTool object.  Options set this way are in
363       effect for all function calls but may be overridden by options passed
364       as arguments to some functions.  Option names are not case sensitive.
365
366       The default option values may be changed by defining a
367       %Image::ExifTool::UserDefined::Options hash.  See the ExifTool_config
368       file in the full ExifTool distribution for examples.
369
370           # exclude the 'OwnerName' tag from returned information
371           $exifTool->Options(Exclude => 'OwnerName');
372
373           # only get information in EXIF or MakerNotes groups
374           $exifTool->Options(Group0 => ['EXIF', 'MakerNotes']);
375
376           # ignore information from IFD1
377           $exifTool->Options(Group1 => '-IFD1');
378
379           # sort by groups in family 2, and extract unknown tags
380           $exifTool->Options(Sort => 'Group2', Unknown => 1);
381
382           # reset DateFormat option
383           $exifTool->Options(DateFormat => undef);
384
385           # do not extract duplicate tag names
386           $oldSetting = $exifTool->Options(Duplicates => 0);
387
388           # get current Verbose setting
389           $isVerbose = $exifTool->Options('Verbose');
390
391           # set a user parameter
392           $exifTool->Options(UserParam => 'MyParam=some value');
393
394       Inputs:
395           0) ExifTool object reference
396
397           1) Option parameter name (case-insensitive)
398
399           2) [optional] Option parameter value (may be undef to clear option)
400
401           3-N) [optional] Additional parameter/value pairs
402
403       Option Parameters:
404           Note that these API options may also be used in the exiftool
405           application via the command-line -api option.
406
407           Binary
408               Flag to extract the value data for all binary tags.  Tag values
409               representing large binary data blocks (eg. ThumbnailImage) are
410               not necessarily extracted unless this option is set or the tag
411               is specifically requested by name.  Default is undef.
412
413           ByteOrder
414               The byte order for newly created EXIF segments when writing.
415               Note that if EXIF information already exists, the existing
416               order is maintained.  Valid values are 'MM', 'II' and undef.
417               If ByteOrder is not defined (the default), then the maker note
418               byte order is used (if they are being copied), otherwise big-
419               endian ('MM') order is assumed.  This can also be set via the
420               ExifByteOrder tag, but the ByteOrder option takes precedence if
421               both are set.
422
423           Charset
424               Character set for encoding character tag values passed to/from
425               ExifTool with code points above U+007F.  Default is 'UTF8'.
426               Valid values are listed below, case is not significant:
427
428                 Value        Alias(es)        Description
429                 -----------  ---------------  ----------------------------------
430                 UTF8         cp65001, UTF-8   UTF-8 characters
431                 Latin        cp1252, Latin1   Windows Latin1 (West European)
432                 Latin2       cp1250           Windows Latin2 (Central European)
433                 Cyrillic     cp1251, Russian  Windows Cyrillic
434                 Greek        cp1253           Windows Greek
435                 Turkish      cp1254           Windows Turkish
436                 Hebrew       cp1255           Windows Hebrew
437                 Arabic       cp1256           Windows Arabic
438                 Baltic       cp1257           Windows Baltic
439                 Vietnam      cp1258           Windows Vietnamese
440                 Thai         cp874            Windows Thai
441                 DOSLatinUS   cp437            DOS Latin US
442                 DOSLatin1    cp850            DOS Latin1
443                 MacRoman     cp10000, Roman   Macintosh Roman
444                 MacLatin2    cp10029          Macintosh Latin2 (Central Europe)
445                 MacCyrillic  cp10007          Macintosh Cyrillic
446                 MacGreek     cp10006          Macintosh Greek
447                 MacTurkish   cp10081          Macintosh Turkish
448                 MacRomanian  cp10010          Macintosh Romanian
449                 MacIceland   cp10079          Macintosh Icelandic
450                 MacCroatian  cp10082          Macintosh Croatian
451
452               Note that this option affects some types of information when
453               reading/writing the file and other types when getting/setting
454               tag values, so it must be defined for both types of access.
455               See the "CHARACTER ENCODINGS" section for more information
456               about the handling of special characters.
457
458           CharsetEXIF
459               Internal encoding to use for stored EXIF "ASCII" string values.
460               May also be set to undef to pass through EXIF "ASCII" values
461               without recoding.  Set to "UTF8" to conform with the MWG
462               recommendation.  Default is undef.
463
464           CharsetFileName
465               External character set used for file names passed to ExifTool
466               functions.  When set in Windows, this triggers use of Windows
467               wide-character i/o library routines (requires Win32API::File).
468               Default is undef.  May also be set to an empty string to avoid
469               "encoding not specified" warnings on Windows.
470
471           CharsetID3
472               Internal encoding to assume for ID3v1 strings.  By the
473               specification ID3v1 strings should be encoded in ISO 8859-1
474               (essentially Latin), but some applications may use local
475               encoding instead.  Default is 'Latin'.
476
477           CharsetIPTC
478               Fallback internal IPTC character set to assume if IPTC
479               information contains no CodedCharacterSet tag.  Possible values
480               are the same as the "Charset" option.  Default is 'Latin'.
481
482               Note that this option affects some types of information when
483               reading/writing the file and other types when getting/setting
484               tag values, so it must be defined for both types of access.
485
486           CharsetPhotoshop
487               Internal encoding to assume for Photoshop IRB resource names.
488               Default is 'Latin'.
489
490           CharsetQuickTime
491               Internal encoding to assume for QuickTime strings stored with
492               an unspecified encoding.  Default is 'MacRoman'.
493
494           CharsetRIFF
495               Internal encoding to assume for strings in RIFF metadata (eg.
496               AVI and WAV files).  The default value of 0 assumes "Latin"
497               encoding unless otherwise specified by the RIFF CSET chunk.
498               Set to undef to pass through strings without recoding.  Default
499               is 0.
500
501           Compact
502               Comma-delimited list of settings for writing compact XMP.
503               Below is a list of available settings.  Note that 'NoPadding'
504               effects only embedded XMP since padding is never written for
505               stand-alone XMP files.  Also note that 'OneDesc' is not
506               recommended when writing XMP larger than 64 kB to a JPG file
507               because it interferes with ExifTool's technique of splitting
508               off the large description elements into the extended XMP.  Case
509               is not significant for any of these options.  Default is undef.
510
511                 NoPadding - Avoid 2 kB of recommended padding at end of XMP
512                 NoIndent  - Avoid spaces to indent lines for readability
513                 NoNewline - Avoid unnecessary newlines
514                 Shorthand - Use XMP Shorthand format
515                 OneDesc   - Combine XMP properties into a single rdf:Description
516                 AllSpace  - Equivalent to 'NoPadding,NoIndent,NoNewline'
517                 AllFormat - Equivalent to 'Shorthand,OneDesc'
518                 All       - Equivalent to 'AllSpace,AllFormat'
519
520           Composite
521               Flag to generate Composite tags when extracting information.
522               Default is 1.
523
524           Compress
525               Flag to write new values in compressed format if possible.  Has
526               no effect unless Compress::Zlib is installed.  Default is
527               undef.
528
529           CoordFormat
530               Format for printing GPS coordinates.  This is a printf format
531               string with specifiers for degrees, minutes and seconds in that
532               order, however minutes and seconds may be omitted.  If the
533               hemisphere is known, a reference direction (N, S, E or W) is
534               appended to each printed coordinate, but adding a "+" to the
535               first format specifier (eg. "%+.6f") prints a signed coordinate
536               instead.  For example, the following table gives the output for
537               the same coordinate using various formats:
538
539                     CoordFormat        Example Output
540                 -------------------  ------------------
541                 q{%d deg %d' %.2f"}  54 deg 59' 22.80"  (default for reading)
542                 q{%d %d %.8f}        54 59 22.80000000  (default for copying)
543                 q{%d deg %.4f min}   54 deg 59.3800 min
544                 q{%.6f degrees}      54.989667 degrees
545
546               Note:  To avoid loss of precision, the default coordinate
547               format is different when copying tags with
548               "SetNewValuesFromFile".
549
550           DateFormat
551               Format for printing date/time values.  See "strftime" in the
552               POSIX package for details about the format string.  If date can
553               not be converted, value is left unchanged unless the StrictDate
554               option is set.  Timezones are ignored.  The inverse conversion
555               (ie. when calling "SetNewValue") is performed only if
556               POSIX::strptime or Time::Piece is installed.  The default
557               setting of undef causes date/time values to remain in standard
558               EXIF format (similar to a DateFormat of "%Y:%m:%d %H:%M:%S").
559
560           Duplicates
561               Flag to return values from tags with duplicate names when
562               extracting information.  Default is 1.
563
564           Escape
565               Escape special characters in extracted values for HTML or XML.
566               Also unescapes HTML or XML character entities in input values
567               passed to "SetNewValue".  Valid settings are 'HTML', 'XML' or
568               undef.  Default is undef.
569
570           Exclude
571               Exclude specified tags from tags extracted from an image.  The
572               option value is either a tag name or reference to a list of tag
573               names to exclude.  The case of tag names is not significant.
574               This option is ignored for specifically requested tags.  Tags
575               may also be excluded by preceding their name with a '-' in the
576               arguments to "ImageInfo".
577
578           ExtendedXMP
579               This setting affects the reading and editing of extended XMP in
580               JPEG images.  According to the XMP specification, extended XMP
581               is only valid if it has the GUID specified by the
582               HasExtendedXMP tag, so by default ExifTool will ignore other
583               extended XMP, but this option allows full control over the
584               extended XMP to be extracted.
585
586                    0   - Ignore all extended XMP
587                    1   - Read extended XMP with valid GUID only (default)
588                    2   - Read extended XMP with any GUID
589                 <guid> - Read extended XMP with a specific GUID
590
591           ExtractEmbedded
592               Flag to extract information from embedded documents in EPS
593               files, embedded EPS information and JPEG and Jpeg2000 images in
594               PDF files, embedded MPF images in JPEG and MPO files, timed
595               metadata in videos, and the resource fork of Mac OS files.
596               Default is undef.
597
598           FastScan
599               Flag to increase speed when reading files by avoiding
600               extraction of some types of metadata.  With this option set to
601               1, ExifTool will not scan to the end of a JPEG image to check
602               for an AFCP, CanonVRD, FotoStation, PhotoMechanic, MIE or
603               PreviewImage trailer.  This also stops the parsing after the
604               first comment in GIF images, and at the audio/video data of
605               RIFF-format files (AVI, WAV, etc), so any trailing metadata
606               (eg. XMP written by some utilities) may be missed.  Also
607               disables input buffering for some types of files to reduce
608               memory usage when reading from a non-seekable stream.  When
609               combined with the ScanForXMP option, prevents scanning for XMP
610               in recognized file types.  With a value of 2, ExifTool will
611               also avoid extracting any EXIF MakerNote information, and will
612               stop parsing at the IDAT chunk of PNG images.  (By the PNG
613               specification, metadata is allowed after IDAT, but ExifTool
614               always writes it before because some utilities will ignore it
615               otherwise.)  When set to 3 or 4, only pseudo system tags and
616               FileType are generated.  For 3, the file header is read to
617               provide an educated guess at FileType.  For 4, the file is not
618               read at all and FileType is determined based on the file's
619               extension.  Default is undef.
620
621           Filter
622               Perl expression used to filter values for all tags.  The
623               expression acts on the value of the Perl default variable ($_),
624               and changes the value of this variable as required.  The value
625               is not changed if $_ is set to undef.  List items are filtered
626               individually.  Applies to all returned values unless PrintConv
627               option is disabled.
628
629           FilterW
630               Perl expression used to filter PrintConv values when writing.
631               The expression acts on the value of the Perl default variable
632               ($_), and changes the value of this variable as required.  The
633               value is not changed if $_ is set to undef.
634
635           FixBase
636               Fix maker notes base offset.  A common problem with image
637               editing software is that offsets in the maker notes are not
638               adjusted properly when the file is modified.  This may cause
639               the wrong values to be extracted for some maker note entries
640               when reading the edited file.  FixBase specifies an integer
641               value to be added to the maker notes base offset.  It may also
642               be set to the empty string ('') for ExifTool will take its best
643               guess at the correct base, or undef (the default) for no base
644               adjustment.
645
646           GeoMaxIntSecs
647               Maximum interpolation time in seconds for geotagging.
648               Geotagging is treated as an extrapolation if the Geotime value
649               lies between two fixes in the same track which are separated by
650               a number of seconds greater than this.  Otherwise, the
651               coordinates are calculated as a linear interpolation between
652               the nearest fixes on either side of the Geotime value.  Set to
653               0 to disable interpolation and use the coordinates of the
654               nearest fix instead (provided it is within GeoMaxExtSecs,
655               otherwise geotagging fails).  Default is 1800.
656
657           GeoMaxExtSecs
658               Maximum extrapolation time in seconds for geotagging.
659               Geotagging fails if the Geotime value lies outside a GPS track
660               by a number of seconds greater than this.  Otherwise, for an
661               extrapolation the coordinates of the nearest fix are taken (ie.
662               it is assumed that you weren't moving during this period).
663               Default is 1800.
664
665           GeoMaxHDOP
666               Maximum Horizontal (2D) Dilution Of Precision for geotagging.
667               GPS fixes are ignored if the HDOP is greater than this.
668               Default is undef.
669
670           GeoMaxPDOP
671               Maximum Position (3D) Dilution Of Precision for geotagging.
672               GPS fixes are ignored if the PDOP is greater than this.
673               Default is undef.
674
675           GeoMinSats
676               Minimum number of satellites for geotagging.  GPS fixes are
677               ignored if the number of acquired satellites is less than this.
678               Default is undef.
679
680           GeoSpeedRef
681               Reference units for writing GPSSpeed when geotagging:
682
683                   'K', 'k' or 'km/h'  - km/h
684                   'M', 'm' or 'mph'   - mph
685                   <anything else>     - knots (default undef)
686
687           GlobalTimeShift
688               Time shift to apply to all extracted date/time PrintConv
689               values.  Does not affect ValueConv values.  Value is a
690               date/time shift string (see Image::ExifTool::Shift(3pm)), with
691               a leading '-' for negative shifts.  Default is undef.
692
693           Group#
694               Extract tags only for specified groups in family # (Group0
695               assumed if # not given).  The option value may be a single
696               group name or a reference to a list of groups.  Case is
697               significant in group names.  Specify a group to be excluded by
698               preceding group name with a '-'.  See "GetGroup" for a
699               description of group families, and "GetAllGroups [static]" for
700               lists of group names.
701
702           HtmlDump
703               Dump information in hex to dynamic HTML web page.  The value
704               may be 0-3 for increasingly larger limits on the maximum block
705               size.  Default is 0.  Output goes to the file specified by the
706               TextOut option (\*STDOUT by default).
707
708           HtmlDumpBase
709               Base for HTML dump offsets.  If not defined, the EXIF/TIFF base
710               offset is used.  Set to 0 for absolute offsets.  Default is
711               undef.
712
713           IgnoreMinorErrors
714               Flag to ignore minor errors.  Causes minor errors to be
715               downgraded to warnings, and minor warnings to be ignored.  This
716               option is provided mainly to allow writing of files when minor
717               errors occur, but by ignoring some minor warnings the behaviour
718               of ExifTool may be changed to allow some questionable
719               operations to proceed (such as extracting thumbnail and preview
720               images even if they don't have a recognizable header).  Minor
721               errors and warnings are denoted by "[minor]" at the start of
722               the message, or "[Minor]" (with a capital "M") for warnings
723               that affect processing when ignored.
724
725           Lang
726               Localized language for exiftool tag descriptions, etc.
727               Available languages are given by the Image::ExifTool::Lang
728               module names (eg. 'fr', 'zh_cn').  If the specified language
729               isn't available, the option is not changed.  May be set to
730               undef to select the built-in default language.  Default is
731               'en'.
732
733           LargeFileSupport
734               Flag to indicate that 64-bit file offsets are supported on this
735               system.  Default is undef.
736
737           ListItem
738               Return only a specific item from list-type values.  A value of
739               0 returns the first item in the list, 1 return the second item,
740               etc.  Negative indices may also be used, with -1 representing
741               the last item in the list.  Applies only to the top-level list
742               of nested lists.  Default is undef to return all items in the
743               list.
744
745           ListJoin
746               Separator used to join the PrintConv value of multi-item List-
747               type tags into a single string.  If not defined, multi-item
748               lists are returned as a list reference.  Does not affect
749               ValueConv values.  Default is ', '.
750
751           ListSplit
752               Regular expression used to split values of list-type tags into
753               individual items when writing.  (eg. use ',\\s*' to split a
754               comma-separated list.)  Split when writing either PrintConv or
755               ValueConv values.  Default is undef.
756
757           MakerNotes
758               Option to extract MakerNotes and other writable subdirectories
759               (such as PrintIM) as a data block.  Normally when the
760               MakerNotes are extracted they are rebuilt to include data
761               outside the boundaries of the original maker note data block,
762               but a value of 2 disables this feature.  Possible values are:
763
764                 0 - Do not extract writable subdirectories (same as default of undef)
765                 1 - Extract and rebuild maker notes into self-contained block
766                 2 - Extract without rebuilding maker notes
767
768           MDItemTags
769               Flag to extract the OS X metadata item tags (see the "mdls" man
770               page and "MacOS MDItem Tags" in Image::ExifTool::TagNames for
771               more information).
772
773           MissingTagValue
774               Value for missing tags in tag name expressions (or tags where
775               the advanced formatting expression returns undef).  If not set,
776               a minor error is issued for missing values, or the value is set
777               to '' if "IgnoreMinorErrors" is set.  Default is undef.
778
779           NoPDFList
780               Flag to avoid splitting PDF list-type tag values into separate
781               items.  Default is undef.
782
783           Password
784               Password for reading/writing password-protected PDF documents.
785               Ignored if a password is not required.  Character encoding of
786               the password is determined by the value of the Charset option
787               at processing time.  Default is undef.
788
789           PrintConv
790               Flag to enable automatic print conversion.  Also enables
791               inverse print conversion for writing.  Default is 1.
792
793           QuickTimeHandler
794               Flag set to add an 'mdir' Handler to a newly created Meta box
795               when adding QuickTime ItemList tags.  Adobe Bridge does not add
796               this Handler, but it is commonly found in samples from other
797               software, so it is possible that this could affect the
798               interoperability of ItemList tags.  Default is undef.
799
800           QuickTimeUTC
801               Flag set to assume that QuickTime date/time values are stored
802               as UTC, causing conversion to local time when they are
803               extracted and from local time when written.  According to the
804               QuickTime specification date/time values should be UTC, but
805               many digital cameras store local time instead (presumably
806               because they don't know the time zone), so the default is to
807               not convert these times.  This option also disables the
808               autodetection of incorrect time-zero offsets in QuickTime
809               date/time values, and enforces a time zero of 1904 as per the
810               QuickTime specification.
811
812           RequestAll
813               Flag to request all tags to be extracted.  This causes some
814               tags to be generated which normally would not be unless
815               specifically requested (by passing the tag name to "ImageInfo"
816               or "ExtractInfo").  May be set to 2 or 3 to enable generation
817               of some additional tags as mentioned in the tag name
818               documentation.  Default is undef.
819
820           RequestTags
821               List of additional tag and/or group names to request in the
822               next call to "ExtractInfo".  This option is useful only for
823               tags/groups which aren't extracted unless specifically
824               requested.  Value may be a list reference, a delimited string
825               of names (any delimiter is allowed), or undef to clear the
826               current RequestTags list.  Groups are requested by adding a
827               colon after the name (eg. "MacOS:").  Names are converted to
828               lower case as they are added to the list.  Default is undef.
829
830           SaveFormat
831               Flag to save EXIF/TIFF format type as the family 6 group name
832               when extracting information.  Without this option set, the
833               family 6 group names are not generated.  Default is undef.  See
834               the "GetGroup" option for more details.
835
836           SavePath
837               Flag to save the metadata path as the family 5 group name when
838               extracting information.  Without this option set, the family 5
839               group names are not generated.  Default is undef.  See the
840               "GetGroup" option for more details.
841
842           ScanForXMP
843               Flag to scan all files (even unrecognized formats) for XMP
844               information unless XMP was already found in the file.  When
845               combined with the FastScan option, only unrecognized file types
846               are scanned for XMP.  Default is undef.
847
848           Sort
849               Specifies order to sort tags in returned list:
850
851                 Input  - Sort in same order as input tag arguments (default)
852                 File   - Sort in order that tags were found in the file
853                 Tag    - Sort alphabetically by tag name
854                 Descr  - Sort by tag description (for current Lang setting)
855                 Group# - Sort by tag group, where # is zero or more family
856                          numbers separated by colons. If # is not specified,
857                          Group0 is assumed.  See GetGroup for a description
858                          of group families.
859
860           Sort2
861               Secondary sort order used for tags within each group when Sort
862               is 'Group':
863
864                 File   - Sort in order tags were found in the file (default)
865                 Tag    - Sort alphabetically by tag name
866                 Descr  - Sort by tag description (for current Lang setting)
867
868           StrictDate
869               Flag to return undefined value for any date which can't be
870               converted when the DateFormat option is used.  Default is
871               undef.
872
873                 undef - Same as 0 for reading/writing, or 1 for copying
874                   0   - Return date/time value unchanged if it can't be converted
875                   1   - Return undef if date/time value can't be converted
876
877               When set to 1 while writing a PrintConv date/time value with
878               the DateFormat option set, the value is written only if
879               POSIX::strptime or Time::Piece is available and can
880               successfully convert the value.
881
882               For PNG CreationTime, a setting of 1 has the additional effect
883               of causing the date/time to be reformatted according to PNG 1.2
884               recommendation (RFC-1123) when writing, and a warning to be
885               issued for any non-standard value when reading (but note that
886               Windows may not recognize PNG date/time values in standard
887               format).
888
889           Struct
890               Flag to return XMP structures as hash references instead of
891               flattening into individual tags.  Has no effect when writing
892               since both flattened and structured tags may always be written.
893               Possible values are:
894
895                 undef - (default) Same as 0 for reading, 2 for copying
896                   0   - Read/copy flattened tags
897                   1   - Read/copy structured tags
898                   2   - Read/copy both flattened and structured tags, but flag
899                         flattened tags as 'unsafe' for copying
900
901           SystemTags
902               Flag to extract the following additional File System tags:
903               FileAttributes, FileDeviceNumber, FileInodeNumber,
904               FileHardLinks, FileUserID, FileGroupID, FileDeviceID,
905               FileBlockSize and FileBlockCount.
906
907           TextOut
908               Output file reference for Verbose and HtmlDump options.
909               Default is \*STDOUT.
910
911           TimeZone
912               Time zone for local date/time values.  May be set to any valid
913               TZ string.  Uses the system time zone if not specified.
914               Default is undef.  (Requires POSIX::tzset, which may not be
915               available in Windows.  A work-around in Windows is to "set
916               TZ=<zone>" before running ExifTool.)
917
918           Unknown
919               Flag to get the values of unknown tags.  If set to 1, unknown
920               tags are extracted from EXIF (or other tagged-format)
921               directories.  If set to 2, unknown tags are also extracted from
922               binary data blocks.  Default is 0.
923
924           UserParam
925               Special option to set/get user-defined parameters.  Useful to
926               allow external input into tag name expressions and ValueConv
927               logic.  Valid UserParam values are:
928
929                 PARAM         - Get parameter
930                 PARAM=        - Clear parameter
931                 PARAM^=       - Set parameter to empty string
932                 PARAM=VALUE   - Set parameter
933                 <hash ref>    - Set entire UserParam hash lookup
934                 undef         - Clear all user parameters
935
936               Where PARAM is the user-defined parameter name (case
937               insensitive).
938
939               User-defined parameters may be accessed in tag name expressions
940               by prefixing the parameter name with a dollar sign just like
941               normal tags, or via the API by calling
942               "Options('UserParam','PARAM')".  If called without no
943               additional arguments, "Options('UserParam')" returns a
944               reference to the hash of all user parameters (with lower-case
945               names).
946
947           Validate
948               Flag to perform extra validation checks when reading, causing
949               extra warnings to be generated if problems are found.  Default
950               is undef.
951
952           Verbose
953               Print verbose messages to file specified by TextOut option.
954               Value may be from 0 to 5 for increasingly verbose messages.
955               Default is 0.  With the verbose option set, messages are
956               printed to the console as the file is parsed.  Level 1 prints
957               the tag names and raw values.  Level 2 adds more details about
958               the tags.  Level 3 adds a hex dump of the tag data, but with
959               limits on the number of bytes dumped.  Levels 4 and 5 remove
960               the dump limit on tag values and JPEG segment data
961               respectively.
962
963           WriteMode
964               Set tag write/create mode.  Value is a string of one or more
965               characters from list below.  Default is 'wcg'.
966
967                   w - Write existing tags
968                   c - Create new tags
969                   g - create new Groups as necessary
970
971               The level of the group differs for different types of metadata.
972               For XMP or IPTC this is the full XMP/IPTC block (the family 0
973               group), but for EXIF this is the individual IFD (the family 1
974               group).  The 'w' and 'c' modes are tested only when
975               "SetNewValue" is called, but the 'g' mode is also tested in
976               "WriteInfo".
977
978           XAttrTags
979               Flag to extract the OS X extended attribute tags (see the
980               "xattr" man page and "MacOS XAttr Tags" in
981               Image::ExifTool::TagNames for more information).
982
983           XMPAutoConv
984               Flag to enable automatic conversion for unknown XMP tags with
985               values that look like rational numbers or dates.  Default is 1.
986
987       Return Values:
988           The original value of the last specified parameter.
989
990   ClearOptions
991       Reset all options to their default values.  Loads user-defined default
992       option values from the %Image::ExifTool::UserDefined::Options hash in
993       the .ExifTool_config file if it exists.
994
995           $exifTool->ClearOptions();
996
997       Inputs:
998           0) ExifTool object reference
999
1000       Return Values:
1001           (none)
1002
1003   ExtractInfo
1004       Extract all meta information from an image.
1005
1006           $success = $exifTool->ExtractInfo('image.jpg', \%options);
1007
1008       Inputs:
1009           "ExtractInfo" takes exactly the same arguments as "ImageInfo".  The
1010           only difference is that a list of tag keys is not returned if an
1011           ARRAY reference is given.  The following options are effective in
1012           the call to "ExtractInfo":
1013
1014           Binary, Charset, CharsetEXIF, CharsetFileName, CharsetID3,
1015           CharsetIPTC, CharsetPhotoshop, CharsetQuickTime, CharsetRIFF,
1016           Composite, ExtendedXMP, ExtractEmbedded, FastScan, FixBase,
1017           HtmlDump, HtmlDumpBase, IgnoreMinorErrors, Lang, LargeFileSupport,
1018           MakerNotes, MDItemTags, NoPDFList, Password, QuickTimeUTC (enforced
1019           1904 time zero), RequestAll, RequestTags, SaveFormat, SavePath,
1020           ScanForXMP, Struct, TextOut, Unknown, Verbose, XAttrTags and
1021           XMPAutoConv.
1022
1023       Return Value:
1024           1 if this was a recognized file format, 0 otherwise (and 'Error'
1025           tag set).
1026
1027   GetInfo
1028       "GetInfo" is called to return meta information after it has been
1029       extracted from the image by a previous call to "ExtractInfo" or
1030       "ImageInfo". This function may be called repeatedly after a single call
1031       to "ExtractInfo" or "ImageInfo".
1032
1033           # get image width and height only
1034           $info = $exifTool->GetInfo('ImageWidth', 'ImageHeight');
1035
1036           # get all Error and Warning messages
1037           $info = $exifTool->GetInfo('Error', 'Warning');
1038
1039           # get information for all tags in list (list updated with tags found)
1040           $info = $exifTool->GetInfo(\@ioTagList);
1041
1042           # get all information in Author or Location groups
1043           $info = $exifTool->GetInfo({Group2 => ['Author', 'Location']});
1044
1045       Inputs:
1046           Inputs are the same as "ExtractInfo" and "ImageInfo" except that an
1047           image can not be specified.  Options in effect are:
1048
1049           Charset, CoordFormat, DateFormat, Duplicates, Escape, Exclude,
1050           Filter, Group#, GlobalTimeShift, Lang, ListItem, ListJoin,
1051           PrintConv, Sort (if a tag list reference is given) and StrictDate.
1052
1053       Return Value:
1054           Reference to information hash, the same as with "ImageInfo".
1055
1056       The following options are effective in the call to "GetInfo":
1057
1058       Charset, CoordFormat, DateFormat, Duplicates, Escape, Exclude, Filter,
1059       Group#, GlobalTimeShift, Lang, ListItem, ListJoin, PrintConv,
1060       QuickTimeUTC (conversion to local time), Sort (if a tag list reference
1061       is given) and StrictDate.
1062
1063   WriteInfo
1064       Write meta information to a file.  The specified source file is
1065       rewritten to the same-type destination file with new information as
1066       specified by previous calls to "SetNewValue".  The necessary segments
1067       and/or directories are created in the destination file as required to
1068       store the specified information.  May be called repeatedly to write the
1069       same information to additional files without the need to call
1070       "SetNewValue" again.
1071
1072       Note that it is NOT necessary to call "ExtractInfo" or "ImageInfo"
1073       before "WriteInfo".  "WriteInfo" changes only metadata specified by
1074       previous calls to "SetNewValue".
1075
1076           # add information to a source file, writing output to new file
1077           $exifTool->WriteInfo($srcfile, $dstfile);
1078
1079           # create XMP data file from scratch
1080           $exifTool->WriteInfo(undef, $dstfile, 'XMP');
1081
1082           # overwrite file (you do have backups, right?)
1083           $exifTool->WriteInfo($srcfile);
1084
1085       Inputs:
1086           0) ExifTool object reference
1087
1088           1) Source file name, file reference, scalar reference, or undef to
1089           create a file from scratch.  A reference to a File::RandomAccess
1090           object is also allowed as a source, but in this case the
1091           destination is not optional.
1092
1093           2) [optional] Destination file name, file reference, scalar
1094           reference, or undef to overwrite the original file.  May be '-' to
1095           write to stdout.
1096
1097           3) [optional] Destination file type.  Ignored if a source is
1098           defined.
1099
1100       Return Value:
1101           1 if file was written OK, 2 if file was written but no changes
1102           made, 0 on file write error.
1103
1104           If an error code is returned, an Error tag is set and
1105           GetValue('Error') can be called to obtain the error description.  A
1106           Warning tag may be set even if this routine is successful.  Calling
1107           WriteInfo clears any pre-existing Error and Warning tags.
1108
1109               $errorMessage = $exifTool->GetValue('Error');
1110               $warningMessage = $exifTool->GetValue('Warning');
1111
1112       Notes:
1113           The source file name may be undefined to create a file from scratch
1114           (currently only XMP, MIE, ICC, VRD, DR4, EXV and EXIF files can be
1115           created in this way -- see "CanCreate" for details).  If undefined,
1116           the destination file type is required unless the type can be
1117           determined from the extension of the destination file name.
1118
1119           If a destination file name is given, the specified file must not
1120           exist because an existing destination file will not be overwritten.
1121           Any new values for FileName, Directory or HardLink are ignored when
1122           a destination file name is specified.
1123
1124           The destination file name may be undefined to overwrite the
1125           original file (make sure you have backups!).  In this case, if a
1126           source file name is provided, a temporary file is created and
1127           renamed to replace the source file if no errors occurred while
1128           writing.  Otherwise, if a source file reference or scalar reference
1129           is used, the image is first written to memory then copied back to
1130           replace the original if there were no errors.
1131
1132           On Mac OS systems, the file resource fork is preserved if this
1133           routine is called with a source file name.
1134
1135       The following ExifTool options are effective in the call to
1136       "WriteInfo":
1137
1138       ByteOrder, Charset, CharsetEXIF, CharsetFileName, CharsetIPTC, Compact,
1139       Compress, FixBase, IgnoreMinorErrors, Password, QuickTimeHandler,
1140       Verbose and WriteMode.
1141
1142   GetTagList
1143       Get a sorted list of tags from the specified information hash or tag
1144       list.
1145
1146           @tags = $exifTool->GetTagList($info, 'Group0');
1147
1148       Inputs:
1149           0) ExifTool object reference
1150
1151           1) [optional] Information hash reference or tag list reference
1152
1153           2) [optional] Sort order ('Input', 'File', 'Tag', 'Descr' or
1154           'Group#')
1155
1156           3) [optional] Secondary sort order ('File', 'Tag' or 'Descr')
1157
1158           If the information hash or tag list reference is not provided, then
1159           the list of found tags from the last call to "ImageInfo",
1160           "ExtractInfo" or "GetInfo" is used instead, and the result is the
1161           same as if "GetFoundTags" was called.  If sort order is not
1162           specified, the sort order is taken from the current options
1163           settings.
1164
1165       Return Values:
1166           A list of tag keys in the specified order.
1167
1168   GetFoundTags
1169       Get list of found tags in specified sort order.  The found tags are the
1170       tags for the information obtained from the most recent call to
1171       "ImageInfo", "ExtractInfo" or "GetInfo" for this object.
1172
1173           @tags = $exifTool->GetFoundTags('File');
1174
1175       Inputs:
1176           0) ExifTool object reference
1177
1178           1) [optional] Sort order ('Input', 'File', 'Tag', 'Descr' or
1179           'Group#')
1180
1181           2) [optional] Secondary sort order ('File', 'Tag' or 'Descr')
1182
1183           If sort order is not specified, the sort order from the ExifTool
1184           options is used.
1185
1186       Return Values:
1187           A list of tag keys in the specified order.
1188
1189   GetRequestedTags
1190       Get list of requested tags.  These are the tags that were specified in
1191       the arguments of the most recent call to "ImageInfo", "ExtractInfo" or
1192       "GetInfo", including tags specified via a tag list reference. Shortcut
1193       tags are expanded in the list.
1194
1195           @tags = $exifTool->GetRequestedTags();
1196
1197       Inputs:
1198           (none)
1199
1200       Return Values:
1201           List of requested tag keys in the same order that the tags were
1202           specified.  Note that this list will be empty if tags were not
1203           specifically requested (ie. If extracting all tags).
1204
1205   GetValue
1206       Get the value of a specified tag.  The returned value is either the
1207       human-readable (PrintConv) value, the converted machine-readable
1208       (ValueConv) value, the original raw (Raw) value, or the original
1209       rational (Rational) value for rational formats.  If the value type is
1210       not specified, the PrintConv value is returned if the PrintConv option
1211       is set, otherwise the ValueConv value is returned.  The PrintConv
1212       values are same as the values returned by "ImageInfo" and "GetInfo" in
1213       the tag/value hash unless the PrintConv option is disabled.
1214
1215       Tags which represent lists of multiple values (as may happen with
1216       'Keywords' for example) are handled specially.  In scalar context, the
1217       returned PrintConv value for these tags is either a string of values or
1218       a list reference (depending on the ListJoin option setting), and the
1219       ValueConv value is always a list reference.  But in list context,
1220       "GetValue" always returns the list itself.
1221
1222       Note that "GetValue" requires a case-sensitive tag key as an argument.
1223       To retrieve tag information based on a case-insensitive tag name (with
1224       an optional group specifier), use "GetInfo" instead.
1225
1226           # PrintConv example
1227           my $val = $exifTool->GetValue($tag);
1228           if (ref $val eq 'SCALAR') {
1229               print "$tag = (unprintable value)\n";
1230           } else {
1231               print "$tag = $val\n";
1232           }
1233
1234           # ValueConv examples
1235           my $val = $exifTool->GetValue($tag, 'ValueConv');
1236           if (ref $val eq 'ARRAY') {
1237               print "$tag is a list of values\n";
1238           } elsif (ref $val eq 'SCALAR') {
1239               print "$tag represents binary data\n";
1240           } else {
1241               print "$tag is a simple scalar\n";
1242           }
1243
1244           my @keywords = $exifTool->GetValue('Keywords', 'ValueConv');
1245
1246       The following options are in effect when "GetValue" is called:
1247
1248       Charset, CoordFormat, DateFormat, Escape, Filter, GlobalTimeShift,
1249       Lang, ListItem, ListJoin, PrintConv, QuickTimeUTC (conversion to local
1250       time), StrictDate and TimeZone.
1251
1252       Inputs:
1253           0) ExifTool object reference
1254
1255           1) Tag key, or case-sensitive tag name with optional group
1256           prefix(es)
1257
1258           2) [optional] Value type: 'PrintConv', 'ValueConv', 'Both', 'Raw'
1259           or 'Rational'
1260
1261           The default value type is 'PrintConv' if the PrintConv option is
1262           set, otherwise the default is 'ValueConv'.  A value type of 'Both'
1263           returns both ValueConv and PrintConv values as a list.  'Rational'
1264           returns the raw rational value as a string fraction for rational
1265           types, or undef for other types.
1266
1267       Return Values:
1268           The value of the specified tag.  If the tag represents a list of
1269           multiple values and the ListJoin option is enabled then PrintConv
1270           returns a string of values, otherwise a reference to the list is
1271           returned in scalar context. The list itself is returned in list
1272           context.  (Unless 'Both' values are requested, in which case two
1273           list references are returned, regardless of context.)  Values may
1274           also be scalar references to binary data, or hash references if the
1275           "Struct" option is set.
1276
1277           Note: It is possible for "GetValue" to return an undefined
1278           ValueConv or PrintConv value (or an empty list in list context)
1279           even if the tag exists, since it is possible for these conversions
1280           to yield undefined values.  And the Rational value will be
1281           undefined for any non-rational tag.  The Raw value should always
1282           exist if the tag exists.
1283
1284   SetNewValue
1285       Set the new value for a tag.  The routine may be called multiple times
1286       to set the values of many tags before using "WriteInfo" to write the
1287       new values to an image.
1288
1289       For list-type tags (like Keywords), either call repeatedly with the
1290       same tag name for each value, or call with a reference to the list of
1291       values.
1292
1293           # set a new value for a tag (errors go to STDERR)
1294           $success = $exifTool->SetNewValue($tag, $value);
1295
1296           # set a new value and capture any error message
1297           ($success, $errStr) = $exifTool->SetNewValue($tag, $value);
1298
1299           # delete information for specified tag if it exists in image
1300           # (also resets AddValue and DelValue options for this tag)
1301           $exifTool->SetNewValue($tag);
1302
1303           # reset all values from previous calls to SetNewValue()
1304           $exifTool->SetNewValue();
1305
1306           # delete a specific keyword
1307           $exifTool->SetNewValue('Keywords', $word, DelValue => 1);
1308
1309           # set keywords (a list-type tag) with two new values
1310           $exifTool->SetNewValue(Keywords => 'word1');
1311           $exifTool->SetNewValue(Keywords => 'word2');
1312           # equivalent, but set both in one call using an array reference
1313           $exifTool->SetNewValue(Keywords => ['word1','word2']);
1314
1315           # add a keyword without replacing existing keywords in the file
1316           $exifTool->SetNewValue(Keywords => $word, AddValue => 1);
1317
1318           # conditionally add a tag if it didn't exist before,
1319           # or replace it if it had a specified value ("old value")
1320           $exifTool->SetNewValue(Description => '', DelValue => 1);
1321           $exifTool->SetNewValue(Description => 'old value', DelValue => 1);
1322           $exifTool->SetNewValue(Description => 'new value');
1323
1324           # set a tag in a specific group
1325           $exifTool->SetNewValue(Headline => $val, Group => 'XMP');
1326           $exifTool->SetNewValue('XMP:Headline' => $val);  # (equivalent)
1327
1328           # shift original date/time back by 2.5 hours
1329           $exifTool->SetNewValue(DateTimeOriginal => '2:30', Shift => -1);
1330
1331           # write a tag only if it had a specific value
1332           # (the order of the following calls is not significant)
1333           $exifTool->SetNewValue(Title => $oldVal, DelValue => 1);
1334           $exifTool->SetNewValue(Title => $newVal);
1335
1336           # write tag by numerical value
1337           $exifTool->SetNewValue(Orientation => 6, Type => 'ValueConv');
1338           $exifTool->SetNewValue('Orientation#' => 6);  # (equivalent)
1339
1340           # delete all but EXIF tags
1341           $exifTool->SetNewValue('*');  # delete all...
1342           $exifTool->SetNewValue('EXIF:*', undef, Replace => 2); # ...but EXIF
1343
1344           # write structured information as a HASH reference
1345           $exifTool->SetNewValue('XMP:Flash' => {
1346               mode   => 'on',
1347               fired  => 'true',
1348               return => 'not'
1349           });
1350
1351           # write structured information as a serialized string
1352           $exifTool->SetNewValue('XMP:Flash'=>'{mode=on,fired=true,return=not}');
1353
1354       (See <https://exiftool.org/struct.html#Serialize> for a description of
1355       the structure serialization technique.)
1356
1357       Inputs:
1358           0) ExifTool object reference
1359
1360           1) [optional] Tag key or tag name, or undef to clear all new
1361           values.  The tag name may be prefixed by one or more family 0, 1 or
1362           2 group names with optional leading family numbers, separated by
1363           colons (eg. 'EXIF:Artist', 'XMP:Time:*'), which is equivalent to
1364           using a Group option argument.  Also, a '#' may be appended to the
1365           tag name (eg. 'EXIF:Orientation#'), with the same effect as setting
1366           Type to 'ValueConv'.  Wildcards ('*' and '?') may be used in the
1367           tag name to assign multiple tags simultaneously.  A tag name of '*'
1368           is special when deleting information, and will delete an entire
1369           group even if some individual tags in the group are not writable,
1370           but only if a single family 0 or 1 group is specified (otherwise
1371           the tags are deleted individually).  Use "GetDeleteGroups" to get a
1372           list of deletable group names, and see Image::ExifTool::TagNames
1373           for a complete list of tag names.
1374
1375           2) [optional] New value for tag.  Undefined to delete tag from
1376           file.  May be a scalar, scalar reference, list reference to set a
1377           list of values, or hash reference for a structure.  Integer values
1378           may be specified as a hexadecimal string (with a leading '0x'), and
1379           simple rational values may be specified in fractional form (eg.
1380           '4/10').  Structure tags may be specified either as a hash
1381           reference or a serialized string (see the last two examples above).
1382
1383           3-N) [optional] SetNewValue option/value pairs (see below).
1384
1385       SetNewValue Options:
1386           AddValue
1387               Specifies that the value be added to an existing list in a file
1388               rather than overwriting the existing values.  Valid settings
1389               are 0 (overwrite any existing tag value), 1 (add to an existing
1390               list and warn for non-list tags) or 2 (add to existing list and
1391               overwrite non-list tags).  Default is 0.
1392
1393           DelValue
1394               Delete existing tag from a file if it has the specified value.
1395               For list-type tags this deletes a specified item from the list.
1396               For non-list tags this may be used to conditionally replace a
1397               tag by providing a new value in a separate call to SetNewValue
1398               (see examples above).  For structured tags, the entire
1399               structure is deleted/replaced only if all of the specified
1400               fields match the existing structure.  Option values are 0 or 1.
1401               Default is 0.
1402
1403           EditGroup
1404               Create tags in existing groups only.  Don't create new group.
1405               Valid values are 0 and 1.  Effectively removes the 'g' from the
1406               ExifTool WriteMode option for this tag only.  Default is 0.
1407
1408           EditOnly
1409               Edit tag only if it already exists.  Don't create new tag.
1410               Valid values are 0 and 1.  Effectively removes the 'c' from the
1411               ExifTool WriteMode option for this tag only.  Default is 0.
1412
1413           Group
1414               Specifies group name where tag should be written.  This option
1415               is superseded by any group specified in the tag name.  If not
1416               specified, tag is written to highest priority group as
1417               specified by "SetNewGroups".  May be one or more family 0, 1 or
1418               2 groups with optional leading family number, separated by
1419               colons.  Case is not significant.
1420
1421           NoFlat
1422               Treat flattened tags as 'unsafe'.
1423
1424           NoShortcut
1425               Disables default behaviour of looking up tag in shortcuts if
1426               not found otherwise.
1427
1428           Protected
1429               Bit mask for tag protection levels to write.  Bit 0x01 allows
1430               writing of 'unsafe' tags (ie. tags not copied automatically via
1431               "SetNewValuesFromFile").  Bit 0x02 allows writing of
1432               'protected' tags, and should only be used internally by
1433               ExifTool.  See Image::ExifTool::TagNames, for a list of tag
1434               names indicating 'unsafe' and 'protected' tags.  Default is 0.
1435
1436           ProtectSaved
1437               Avoid setting new values which were saved after the Nth call to
1438               "SaveNewValues".  Has no effect on unsaved values, or values
1439               saved before Nth call.  Option value is N.  Default is undef.
1440
1441           Replace
1442               Flag to replace the previous new values for this tag (ie.
1443               replace the values set in previous calls to "SetNewValue").
1444               This option is most commonly used to replace previously-set new
1445               values for list-type tags.  Valid values are 0 (set new value
1446               normally -- adds to new values for list-type tags), 1 (reset
1447               any previous new values before setting new value) or 2 (reset
1448               previous new values only; new value argument is ignored).
1449               Default is 0.
1450
1451           Shift
1452               Shift the tag by the specified value.  Currently only date/time
1453               tags and tags with numerical values may be shifted.  Undefined
1454               for no shift, 1 for a positive shift, or -1 for a negative
1455               shift.  A value of 0 causes a positive shift to be applied if
1456               the tag is shiftable and AddValue is set, or a negative shift
1457               for date/time tags only if DelValue is set. Default is undef.
1458               See Image::ExifTool::Shift(3pm) for more information.
1459
1460           Type
1461               The type of value being set.  Valid values are PrintConv,
1462               ValueConv or Raw.  Default is PrintConv if the "PrintConv"
1463               Option is set, otherwise ValueConv.
1464
1465       Return Values:
1466           In scalar context, returns the number of tags set and error
1467           messages are printed to STDERR.  In list context, returns the
1468           number of tags set, and the error string (which is undefined if
1469           there was no error).
1470
1471       Notes:
1472           When deleting groups of tags, the Replace option may be used to
1473           exclude specific groups from a mass delete.  However, this
1474           technique may not be used to exclude individual tags from a group
1475           delete (unless a family 2 group was specified in the delete).
1476           Instead, use "SetNewValuesFromFile" to recover the values of
1477           individual tags after deleting a group.
1478
1479           When deleting all tags from a JPEG image, the APP14 "Adobe"
1480           information is not deleted by default because doing so may affect
1481           the appearance of the image.  However, this information may be
1482           deleted by specifying it explicitly, either by group (with
1483           'Adobe:*') or as a block (with 'Adobe').
1484
1485       The following ExifTool options are effective in the call to
1486       "SetNewValue":
1487
1488       Charset, DateFormat, Escape, IgnoreMinorErrors, Lang, ListJoin,
1489       ListSplit, PrintConv, QuickTimeUTC, StrictDate, TimeZone, Verbose and
1490       WriteMode.
1491
1492   GetNewValue
1493       Get the new Raw value for a tag.  This is the value set by
1494       "SetNewValue" this is queued to be written to file.  List-type tags may
1495       return multiple values in list context.
1496
1497           $rawVal = $exifTool->GetNewValue($tag);
1498
1499           @rawVals = $exifTool->GetNewValue($tag);
1500
1501       Inputs:
1502           0) ExifTool object reference
1503
1504           1) Tag name (case sensitive, may be prefixed by family 0 or 1 group
1505           name)
1506
1507       Return Values:
1508           List of new Raw tag values, or first value in list when called in
1509           scalar context.  The list may be empty either if the tag isn't
1510           being written, or if it is being deleted (ie. if "SetNewValue" was
1511           called without a value).
1512
1513   SetNewValuesFromFile
1514       A very powerful routine that sets new values for tags from information
1515       found in a specified file.
1516
1517           # set new values from all information in a file...
1518           my $info = $exifTool->SetNewValuesFromFile($srcFile);
1519           # ...then write these values to another image
1520           my $result = $exifTool->WriteInfo($file2, $outFile);
1521
1522           # set all new values, preserving original groups
1523           $exifTool->SetNewValuesFromFile($srcFile, '*:*');
1524
1525           # set specific information
1526           $exifTool->SetNewValuesFromFile($srcFile, @tags);
1527
1528           # set new value from a different tag in specific group
1529           $exifTool->SetNewValuesFromFile($fp, 'XMP-dc:Subject<IPTC:Keywords');
1530
1531           # add all IPTC keywords to XMP subject list
1532           $exifTool->SetNewValuesFromFile($fp, 'XMP-dc:Subject+<IPTC:Keywords');
1533
1534           # set new value from an expression involving other tags
1535           $exifTool->SetNewValuesFromFile($file,
1536               'Comment<ISO=$ISO Aperture=$aperture Exposure=$shutterSpeed');
1537
1538           # set keywords list from the values of multiple tags
1539           $exifTool->SetNewValuesFromFile($file, { Replace => 0 },
1540               'keywords<xmp:subject', 'keywords<filename');
1541
1542           # copy all EXIF information, preserving the original IFD
1543           # (without '*.*<' tags would be copied to the preferred EXIF IFD)
1544           $exifTool->SetNewValuesFromFile($file, '*:*<EXIF:*');
1545
1546           # copy all tags with names starting with "gps" (note: this is
1547           # different than "gps:*" because it will also copy XMP GPS tags)
1548           $exifTool->SetNewValuesFromFile($file, 'gps*');
1549
1550           # set FileName from Model, translating questionable characters
1551           $exifTool->SetNewValuesFromFile($file,
1552               'filename<${model; tr(/\\\\?*:|"><)(_) }.jpg');
1553
1554       Inputs:
1555           0) ExifTool object reference
1556
1557           1) File name, file reference, or scalar reference
1558
1559           2-N) [optional] List of tag names to set or options hash
1560           references.  All writable tags are set if none are specified.  The
1561           tag names are not case sensitive, and may be prefixed by one or
1562           more family 0, 1 or 2 group names with optional leading family
1563           numbers, separated by colons (eg. 'exif:iso').  A leading '-'
1564           indicates tags to be excluded (eg. '-comment'), or a trailing '#'
1565           causes the ValueConv value to be copied (same as setting the Type
1566           option to 'ValueConv' for this tag only).  Wildcards ('*' and '?')
1567           may be used in the tag name.  A tag name of '*' is commonly used
1568           when a group is specified to copy all tags in the group (eg.
1569           'XMP:*').  A special feature allows tag names of the form
1570           'DSTTAG<SRCTAG' (or 'SRCTAG>DSTTAG') to be specified to copy
1571           information to a tag with a different name or a specified group.
1572           Both 'SRCTAG' and 'DSTTAG' may contain wildcards and/or be prefixed
1573           by a group name (eg. 'fileModifyDate<modifyDate' or 'xmp:*<*'),
1574           and/or suffixed by a '#' to disable print conversion.  Copied tags
1575           may also be added or deleted from a list with arguments of the form
1576           'DSTTAG+<SRCTAG' or 'DSTTAG-<SRCTAG'.  Tags are evaluated in order,
1577           so exclusions apply only to tags included earlier in the list.  An
1578           extension of this feature allows the tag value to be set from a
1579           string containing tag names with leading '$' symbols (eg.
1580           'Comment<the file is $filename').  Braces '{}' may be used around
1581           the tag name to separate it from subsequent text, and a '$$' is
1582           used to to represent a '$' symbol.  The behaviour for missing tags
1583           in expressions is defined by the "MissingTagValue" option.  The tag
1584           value may be modified via changes to the default input variable
1585           ($_) in a Perl expression placed inside the braces and after a
1586           semicolon following the tag name (see the last example above).  A
1587           '@' may be added after the tag name (before the semicolon) to make
1588           the expression act on individual list items instead of the
1589           concatenated string for list-type tags.  Braces within the
1590           expression must be balanced. Multiple options hash references may
1591           be passed to set different options for different tags.  Options
1592           apply to subsequent tags in the argument list.
1593
1594           By default, this routine will commute information between same-
1595           named tags in different groups, allowing information to be
1596           translated between images with different formats.  This behaviour
1597           may be modified by specifying a group name for extracted tags (even
1598           if '*' is used as a group name), in which case the information is
1599           written to the original group, unless redirected to a different
1600           group.  When '*' is used for a group name, by default the family 1
1601           group of the original tag is preserved, but a different family may
1602           be specified with a leading family number.  (For example,
1603           specifying '*:*' copies all information while preserving the
1604           original family 1 groups, while '0*:*' preserves the family 0
1605           group.)
1606
1607       SetNewValuesFromFile Options:
1608           The options are the same was for "SetNewValue", and are passed
1609           directly to "SetNewValue" internally, with a few exceptions:
1610
1611           - The Replace option defaults to 1 instead of 0 as with
1612           "SetNewValue".
1613
1614           - The AddValue or DelValue option is set for individual tags if
1615           '+>' or '->' (or '+<' or '-<') are used.
1616
1617           - The Group option is set for tags where a group name is given.
1618
1619           - The Protected flag is set to 1 for individually specified tags.
1620
1621           - The Type option also applies to extracted tags.
1622
1623       Return Values:
1624           A hash of information that was set successfully.  May include
1625           Warning or Error entries if there were problems reading the input
1626           file.
1627
1628       Notes:
1629           The PrintConv option applies to this routine, but it normally
1630           should be left on to provide more reliable transfer of information
1631           between groups.
1632
1633           If a preview image exists, it is not copied.  The preview image
1634           must be transferred separately if desired, in a separate call to
1635           "WriteInfo"
1636
1637           When simply copying all information between files of the same type,
1638           it is usually desirable to preserve the original groups by
1639           specifying '*:*' for the tags to set.
1640
1641           The "Duplicates" option is always in effect for tags extracted from
1642           the source file using this routine.
1643
1644           The "Struct" option is enabled by default for tags extracted by
1645           this routine.  This allows the hierarchy of complex structures to
1646           be preserved when copying, but the Struct option may be set to 0 to
1647           override this behaviour and copy as flattened tags instead.
1648
1649   CountNewValues
1650       Return the total number of new values set.
1651
1652           $numSet = $exifTool->CountNewValues();
1653           ($numSet, $numPseudo) = $exifTool->CountNewValues();
1654
1655       Inputs:
1656           0) ExifTool object reference
1657
1658       Return Values:
1659           In scalar context, returns the total number of tags with new values
1660           set.  In list context, also returns the number of "pseudo" tag
1661           values which have been set.  "Pseudo" tags are tags like FileName
1662           and FileModifyDate which are not contained within the file and can
1663           be changed without rewriting the file.
1664
1665   SaveNewValues
1666       Save state of new values to be later restored by "RestoreNewValues".
1667
1668           $exifTool->SaveNewValues();         # save state of new values
1669           $exifTool->SetNewValue(ISO => 100); # set new value for ISO
1670           $exifTool->WriteInfo($src, $dst1);  # write ISO + previous new values
1671           $exifTool->RestoreNewValues();      # restore previous new values
1672           $exifTool->WriteInfo($src, $dst2);  # write previous new values only
1673
1674       Inputs:
1675           0) ExifTool object reference
1676
1677       Return Value:
1678           Count of the number of times this routine has been called (N) since
1679           the last time the new values were reset.
1680
1681   RestoreNewValues
1682       Restore new values to the settings that existed when "SaveNewValues"
1683       was last called.  May be called repeatedly after a single call to
1684       "SaveNewValues".  See "SaveNewValues" above for an example.
1685
1686       Inputs:
1687           0) ExifTool object reference
1688
1689       Return Value:
1690           None.
1691
1692   SetFileModifyDate
1693       Write the filesystem modification or creation time from the new value
1694       of the FileModifyDate or FileCreateDate tag.
1695
1696           $exifTool->SetNewValue(FileModifyDate => '2000:01:02 03:04:05-05:00',
1697                                  Protected => 1);
1698           $result = $exifTool->SetFileModifyDate($file);
1699
1700       Inputs:
1701           0) ExifTool object reference
1702
1703           1) File name
1704
1705           2) [optional] Base time if applying shift (days before $^T)
1706
1707           3) [optional] Tag to write: 'FileModifyDate' (default), or
1708           'FileCreateDate'
1709
1710       Return Value:
1711           1 if the time was changed, 0 if nothing was done, or -1 if there
1712           was an error setting the time.
1713
1714       Notes:
1715           Equivalent to, but more efficient than calling "WriteInfo" when
1716           only the FileModifyDate or FileCreateDate tag has been set.  If a
1717           timezone is not specified, local time is assumed.  When shifting,
1718           the time of the original file is used unless the optional base time
1719           is specified.
1720
1721           The ability to write FileCreateDate is currently restricted to
1722           Windows systems only.
1723
1724   SetFileName
1725       Set the file name and directory, or create a hard link.  If not
1726       specified, the new file name is derived from the new values of the
1727       FileName and Directory tags, or from the HardLink or SymLink tag if
1728       creating a link.  If the FileName tag contains a '/', then the file is
1729       renamed into a new directory.  If FileName ends with '/', then it is
1730       taken as a directory name and the file is moved into the new directory.
1731       The new value for the Directory tag takes precedence over any directory
1732       specified in FileName.
1733
1734           $result = $exifTool->SetFileName($file);
1735           $result = $exifTool->SetFileName($file, $newName);
1736
1737       Inputs:
1738           0) ExifTool object reference
1739
1740           1) Current file name
1741
1742           2) [optional] New file name
1743
1744           3) [optional] 'HardLink' or 'SymLink' to create a hard or symbolic
1745           link instead of renaming the file, or 'Test' to test renaming
1746           feature by printing the old and new names instead of changing
1747           anything.
1748
1749       Return Value:
1750           1 on success, 0 if nothing was done, or -1 if there was an error
1751           renaming the file or creating the link.
1752
1753       Notes:
1754           Will not overwrite existing files. New directories are created as
1755           necessary.
1756
1757   SetNewGroups
1758       Set the order of the preferred groups when adding new information.  In
1759       subsequent calls to "SetNewValue", new information will be created in
1760       the first valid group of this list.  This has an impact only if the
1761       group is not specified when calling "SetNewValue" and if the tag name
1762       exists in more than one group.  The default order is EXIF, IPTC, XMP,
1763       MakerNotes, QuickTime, Photoshop, ICC_Profile, CanonVRD, Adobe.  Any
1764       family 0 group name may be used.  Case is not significant.
1765
1766           $exifTool->SetNewGroups('XMP','EXIF','IPTC');
1767
1768       Inputs:
1769           0) ExifTool object reference
1770
1771           1-N) Groups in order of priority.  If no groups are specified, the
1772           priorities are reset to the defaults.
1773
1774       Return Value:
1775           None.
1776
1777   GetNewGroups
1778       Get current group priority list.
1779
1780           @groups = $exifTool->GetNewGroups();
1781
1782       Inputs:
1783           0) ExifTool object reference
1784
1785       Return Values:
1786           List of group names in order of write priority.  Highest priority
1787           first.
1788
1789   GetTagID
1790       Get the ID for the specified tag.  The ID is the IFD tag number in EXIF
1791       information, the property name in XMP information, or the data offset
1792       in a binary data block.  For some tags, such as Composite tags where
1793       there is no ID, an empty string is returned.  In list context, also
1794       returns a language code for the tag if available and different from the
1795       default language (eg.  with alternate language entries for XMP "lang-
1796       alt" tags).
1797
1798           $id = $exifTool->GetTagID($tag);
1799           ($id, $lang) = $exifTool->GetTagID($tag);
1800
1801       Inputs:
1802           0) ExifTool object reference
1803
1804           1) Tag key
1805
1806       Return Values:
1807           In scalar context, returns the tag ID or '' if there is no ID for
1808           this tag.  In list context, returns the tag ID (or '') and the
1809           language code (or undef).
1810
1811   GetDescription
1812       Get description for specified tag.  This function will always return a
1813       defined value.  In the case where the description doesn't exist, one is
1814       generated from the tag name.
1815
1816       Inputs:
1817           0) ExifTool object reference
1818
1819           1) Tag key
1820
1821       Return Values:
1822           A description for the specified tag.
1823
1824   GetGroup
1825       Get group name(s) for a specified tag.
1826
1827           # return family 0 group name (eg. 'EXIF');
1828           $group = $exifTool->GetGroup($tag, 0);
1829
1830           # return all groups (eg. qw{EXIF IFD0 Author Main})
1831           @groups = $exifTool->GetGroup($tag);
1832
1833           # return groups as a string (eg. 'Main:IFD0:Author')
1834           $group = $exifTool->GetGroup($tag, ':3:1:2');
1835
1836           # return groups as a simplified string (eg. 'IFD0:Author')
1837           $group = $exifTool->GetGroup($tag, '3:1:2');
1838
1839       Inputs:
1840           0) ExifTool object reference
1841
1842           1) Tag key
1843
1844           2) [optional] Group family number, or string of numbers separated
1845           by colons
1846
1847       Return Values:
1848           Group name (or '' if tag has no group).  If no group family is
1849           specified, "GetGroup" returns the name of the group in family 0
1850           when called in scalar context, or the names of groups for all
1851           families in list context.  Returns a string of group names
1852           separated by colons if the input group family contains a colon.
1853           The string is simplified to remove a leading 'Main:' and adjacent
1854           identical group names unless the family string begins with a colon.
1855
1856       Notes:
1857           The group family numbers are currently available:
1858
1859               0) Information Type         (eg. EXIF, XMP, IPTC)
1860               1) Specific Location        (eg. IFD0, XMP-dc)
1861               2) Category                 (eg. Author, Time)
1862               3) Document Number          (eg. Main, Doc1, Doc3-2)
1863               4) Instance Number          (eg. Copy1, Copy2, Copy3...)
1864               5) Metadata Path            (eg. JPEG-APP1-IFD0-ExifIFD)
1865               6) EXIF/TIFF Format         (eg. int8u, int32u, undef, string)
1866
1867           Families 0 and 1 are based on the file structure, and are similar
1868           except that family 1 is more specific and sub-divides some groups
1869           to give more detail about the specific location where the
1870           information was found.  For example, the EXIF group is split up
1871           based on the specific IFD (Image File Directory), the MakerNotes
1872           group is divided into groups for each manufacturer, and the XMP
1873           group is separated based on the XMP namespace prefix.  Note that
1874           only common XMP namespaces are listed in the GetAllGroups
1875           documentation, but additional namespaces may be present in some XMP
1876           data.  Also note that the 'XMP-xmp...'  group names may appear in
1877           the older form 'XMP-xap...' since these names evolved as the XMP
1878           standard was developed.  The ICC_Profile group is broken down to
1879           give information about the specific ICC_Profile tag from which
1880           multiple values were extracted.  As well, information extracted
1881           from the ICC_Profile header is separated into the ICC-header group.
1882
1883           Family 2 classifies information based on the logical category to
1884           which the information refers.
1885
1886           Family 3 gives the document number for tags extracted from embedded
1887           documents, or 'Main' for tags from the main document.  (See the
1888           "ExtractEmbedded" option for extracting tags from embedded
1889           documents.)  Nested sub-documents (if they exist) are indicated by
1890           numbers separated with dashes in the group name, to an arbitrary
1891           depth. (eg. 'Doc2-3-1' is the 1st sub-sub-document of the 3rd sub-
1892           document of the 2nd embedded document of the main file.)  Document
1893           numbers are also used to differentiate samples for timed metadata
1894           in videos.
1895
1896           Family 4 provides a method for differentiating tags when multiple
1897           tags exist with the same name in the same location.  The primary
1898           instance of a tag (the tag extracted when the Duplicates option is
1899           disabled and no group is specified) has no family 4 group name, but
1900           additional instances have have family 4 group names of 'Copy1',
1901           'Copy2', 'Copy3', etc.  For convenience, the primary tag may also
1902           be accessed using a group name of 'Copy0'.
1903
1904           Family 5 is experimental, and gives the complete path for the
1905           metadata in the file.  Generated only if the "SavePath" option is
1906           used when extracting.
1907
1908           Family 6 is currently used only for EXIF/TIFF metadata, and gives
1909           the format type of the extracted value.  Generated only if the
1910           "SaveFormat" option is used when extracting.
1911
1912           See "GetAllGroups [static]" for complete lists of group names.
1913
1914   GetGroups
1915       Get list of group names that exist in the specified information.
1916
1917           @groups = $exifTool->GetGroups($info, 2);
1918           @groups = $exifTool->GetGroups('3:1');
1919
1920       Inputs:
1921           0) ExifTool object reference
1922
1923           1) [optional] Info hash ref (default is all extracted info)
1924
1925           2) [optional] Group family number, or string of numbers (default 0)
1926
1927       Return Values:
1928           List of group names in alphabetical order. If information hash is
1929           not specified, the group names are returned for all extracted
1930           information. See "GetGroup" for an description of family numbers
1931           and family number strings.
1932
1933   BuildCompositeTags
1934       Builds composite tags from required tags.  The composite tags are
1935       convenience tags which are derived from the values of other tags.  This
1936       routine is called automatically by "ImageInfo" and "ExtractInfo" if the
1937       Composite option is set.
1938
1939       Inputs:
1940           0) ExifTool object reference
1941
1942       Return Values:
1943           (none)
1944
1945       Notes:
1946           Tag values are calculated in alphabetical order unless a tag
1947           Require's or Desire's another composite tag, in which case the
1948           calculation is deferred until after the other tag is calculated.
1949
1950           Composite tags may need to read data from the image for their value
1951           to be determined, and for these "BuildCompositeTags" must be called
1952           while the image is available.  This is only a problem if
1953           "ImageInfo" is called with a filename (as opposed to a file
1954           reference or scalar reference) since in this case the file is
1955           closed before "ImageInfo" returns.  Here the Composite option may
1956           be used so that "BuildCompositeTags" is called from within
1957           "ImageInfo", before the file is closed.
1958
1959   GetTagName [static]
1960       Get name of tag from tag key.  This is a convenience function that
1961       strips the embedded instance number, if it exists, from the tag key.
1962
1963       Note: "static" in the heading above indicates that the function does
1964       not require an ExifTool object reference as the first argument.  All
1965       functions documented below are also static.
1966
1967           $tagName = Image::ExifTool::GetTagName($tag);
1968
1969       Inputs:
1970           0) Tag key
1971
1972       Return Value:
1973           Tag name.  This is the same as the tag key but has the instance
1974           number removed.
1975
1976   GetShortcuts [static]
1977       Get a list of shortcut tags.
1978
1979       Inputs:
1980           (none)
1981
1982       Return Values:
1983           List of shortcut tags (as defined in Image::ExifTool::Shortcuts).
1984
1985   GetAllTags [static]
1986       Get list of all available tag names.
1987
1988           @tagList = Image::ExifTool::GetAllTags($group);
1989
1990       Inputs:
1991           0) [optional] Group name, or string of group names separated by
1992           colons
1993
1994       Return Values:
1995           A list of all available tags in alphabetical order, or all tags in
1996           a specified group or intersection of groups.  The group name is
1997           case insensitive, and any group in families 0-2 may be used except
1998           for EXIF family 1 groups (ie. the specific IFD).
1999
2000   GetWritableTags [static]
2001       Get list of all writable tag names.
2002
2003           @tagList = Image::ExifTool::GetWritableTags($group);
2004
2005       Inputs:
2006           0) [optional] Group name, or string of group names separated by
2007           colons
2008
2009       Return Values:
2010           A list of all writable tags in alphabetical order.  These are the
2011           tags for which values may be set through "SetNewValue".  If a group
2012           name is given, returns only writable tags in specified group(s).
2013           The group name is case insensitive, and any group in families 0-2
2014           may be used except for EXIF family 1 groups (ie. the specific IFD).
2015
2016   GetAllGroups [static]
2017       Get list of all group names in specified family.
2018
2019           @groupList = Image::ExifTool::GetAllGroups($family);
2020
2021       Inputs:
2022           0) Group family number (0-4)
2023
2024       Return Values:
2025           A list of all groups in the specified family in alphabetical order.
2026
2027       Here is a complete list of groups for each of these families:
2028
2029       Family 0 (Information Type):
2030           AFCP, AIFF, APE, APP0, APP1, APP11, APP12, APP13, APP14, APP15,
2031           APP4, APP5, APP6, APP8, ASF, Audible, CanonVRD, Composite, DICOM,
2032           DNG, DV, DjVu, Ducky, EXE, EXIF, ExifTool, FITS, FLAC, FLIR, File,
2033           Flash, FlashPix, Font, FotoStation, GIF, GIMP, GeoTiff, GoPro,
2034           H264, HTML, ICC_Profile, ID3, IPTC, ISO, ITC, JFIF, JPEG, JSON,
2035           Jpeg2000, LNK, Leaf, Lytro, M2TS, MIE, MIFF, MNG, MOI, MPC, MPEG,
2036           MPF, MXF, MakerNotes, Matroska, Meta, Ogg, OpenEXR, Opus, PDF,
2037           PICT, PLIST, PNG, PSP, Palm, Parrot, PanasonicRaw, PhotoCD,
2038           PhotoMechanic, Photoshop, PostScript, PrintIM, QuickTime, RAF,
2039           RIFF, RSRC, RTF, Radiance, Rawzor, Real, Red, SVG, SigmaRaw, Stim,
2040           Theora, Torrent, Trailer, VCard, Vorbis, WTV, XML, XMP, ZIP
2041
2042       Family 1 (Specific Location):
2043           AC3, AFCP, AIFF, APE, ASF, AVI1, Adobe, AdobeCM, AdobeDNG, Apple,
2044           Audible, CIFF, CameraIFD, Canon, CanonCustom, CanonRaw, CanonVRD,
2045           Casio, Chapter#, Composite, DICOM, DJI, DNG, DV, DjVu, DjVu-Meta,
2046           Ducky, EPPIM, EXE, EXIF, ExifIFD, ExifTool, FITS, FLAC, FLIR, File,
2047           Flash, FlashPix, Font, FotoStation, FujiFilm, FujiIFD, GE, GIF,
2048           GIMP, GPS, GeoTiff, GlobParamIFD, GoPro, GraphConv, H264, HP, HTC,
2049           HTML, HTML-dc, HTML-ncc, HTML-office, HTML-prod, HTML-vw96, HTTP-
2050           equiv, ICC-chrm, ICC-clrt, ICC-header, ICC-meas, ICC-meta, ICC-
2051           view, ICC_Profile, ICC_Profile#, ID3, ID3v1, ID3v1_Enh, ID3v2_2,
2052           ID3v2_3, ID3v2_4, IFD0, IFD1, IPTC, IPTC#, ISO, ITC, Insta360,
2053           InteropIFD, ItemList, JFIF, JFXX, JPEG, JPEG-HDR, JSON, JVC,
2054           Jpeg2000, KDC_IFD, Keys, Kodak, KodakBordersIFD, KodakEffectsIFD,
2055           KodakIFD, KyoceraRaw, LNK, Leaf, LeafSubIFD, Leica, Lytro, M2TS,
2056           MAC, MIE-Audio, MIE-Camera, MIE-Canon, MIE-Doc, MIE-Extender, MIE-
2057           Flash, MIE-GPS, MIE-Geo, MIE-Image, MIE-Lens, MIE-Main, MIE-
2058           MakerNotes, MIE-Meta, MIE-Orient, MIE-Preview, MIE-Thumbnail, MIE-
2059           UTM, MIE-Unknown, MIE-Video, MIFF, MNG, MOBI, MOI, MPC, MPEG, MPF0,
2060           MPImage, MS-DOC, MXF, MacOS, MakerNotes, MakerUnknown, Matroska,
2061           MediaJukebox, Meta, MetaIFD, Microsoft, Minolta, MinoltaRaw,
2062           Motorola, NITF, Nikon, NikonCapture, NikonCustom, NikonScan,
2063           Nintendo, Ocad, Ogg, Olympus, OpenEXR, Opus, PDF, PICT, PNG, PNG-
2064           pHYs, PSP, Palm, Panasonic, PanasonicRaw, Pentax, PhaseOne,
2065           PhotoCD, PhotoMechanic, Photoshop, PictureInfo, PostScript,
2066           PreviewIFD, PrintIM, ProfileIFD, Qualcomm, QuickTime, RAF, RAF2,
2067           RIFF, RMETA, RSRC, RTF, Radiance, Rawzor, Real, Real-CONT, Real-
2068           MDPR, Real-PROP, Real-RA3, Real-RA4, Real-RA5, Real-RJMD, Reconyx,
2069           Red, Ricoh, SPIFF, SR2, SR2DataIFD, SR2SubIFD, SRF#, SVG, Samsung,
2070           Sanyo, Scalado, Sigma, SigmaRaw, Sony, SonyIDC, Stim, SubIFD,
2071           System, Theora, Torrent, Track#, UserData, VCalendar, VCard,
2072           Version0, Vorbis, WTV, XML, XMP, XMP-DICOM, XMP-GAudio, XMP-GDepth,
2073           XMP-GFocus, XMP-GImage, XMP-GPano, XMP-GSpherical, XMP-LImage, XMP-
2074           MP, XMP-MP1, XMP-PixelLive, XMP-aas, XMP-acdsee, XMP-album, XMP-
2075           apple-fi, XMP-aux, XMP-cc, XMP-cell, XMP-creatorAtom, XMP-crs, XMP-
2076           dc, XMP-dex, XMP-digiKam, XMP-drone-dji, XMP-dwc, XMP-exif, XMP-
2077           exifEX, XMP-expressionmedia, XMP-extensis, XMP-fpv, XMP-getty, XMP-
2078           ics, XMP-iptcCore, XMP-iptcExt, XMP-lr, XMP-mediapro, XMP-
2079           microsoft, XMP-mwg-coll, XMP-mwg-kw, XMP-mwg-rs, XMP-pdf, XMP-pdfx,
2080           XMP-photomech, XMP-photoshop, XMP-plus, XMP-pmi, XMP-prism, XMP-
2081           prl, XMP-prm, XMP-pur, XMP-rdf, XMP-swf, XMP-tiff, XMP-x, XMP-xmp,
2082           XMP-xmpBJ, XMP-xmpDM, XMP-xmpMM, XMP-xmpNote, XMP-xmpPLUS, XMP-
2083           xmpRights, XMP-xmpTPg, ZIP
2084
2085       Family 2 (Category):
2086           Audio, Author, Camera, Device, Document, ExifTool, Image, Location,
2087           Other, Preview, Printing, Time, Unknown, Video
2088
2089       Family 3 (Document Number):
2090           Doc#, Main
2091
2092       Family 4 (Instance Number):
2093           Copy#
2094
2095       Family 5 (Metadata Path):
2096           eg. JPEG-APP1-IFD0-ExifIFD
2097
2098       Family 6 (EXIF/TIFF Format):
2099           int8u, string, int16u, int32u, rational64u, int8s, undef, int16s,
2100           int32s, rational64s, float, double, ifd, unicode, complex, int64u,
2101           int64s, ifd64
2102
2103   GetDeleteGroups [static]
2104       Get list of all deletable group names.
2105
2106           @delGroups = Image::ExifTool::GetDeleteGroups();
2107
2108       Inputs:
2109           None.
2110
2111       Return Values:
2112           A list of deletable group names in alphabetical order.  The current
2113           list of deletable group names is:
2114
2115           AFCP, APP0, APP1, APP10, APP11, APP12, APP13, APP14, APP15, APP2,
2116           APP3, APP4, APP5, APP6, APP7, APP8, APP9, Adobe, Audio, Author,
2117           CIFF, Camera, CanonVRD, Document, Ducky, EXIF, ExifIFD, ExifTool,
2118           File, FlashPix, FotoStation, GPS, GlobParamIFD, ICC_Profile, IFD0,
2119           IFD1, IPTC, Image, InteropIFD, JFIF, Jpeg2000, Location, MIE, MPF,
2120           MakerNotes, Meta, MetaIFD, NikonCapture, Other, PDF, PDF-update,
2121           PNG, PNG-pHYs, PhotoMechanic, Photoshop, Preview, PrintIM,
2122           Printing, RMETA, RSRC, SubIFD, Time, Trailer, Video, XML, XML-*,
2123           XMP, XMP-*
2124
2125           To schedule a group for deletion, call "SetNewValue" with a tag
2126           name like 'EXIF:*' and an undefined tag value.
2127
2128           Deleting a family 0 or 1 group will delete the entire corresponding
2129           block of metadata, but deleting a family 2 group (eg. Audio,
2130           Author, Camera, etc.)  deletes the individual tags belonging to
2131           that category.
2132
2133           The 'Trailer' group allows all trailers in JPEG and TIFF-format
2134           images to be deleted at once, including unknown trailers.  Note
2135           that the JPEG "APP" groups are special, and are used only to delete
2136           application segments which are not associated with another
2137           deletable group. For example, deleting 'APP14:*' will delete other
2138           APP14 segments, but not the APP14 "Adobe" segment.
2139
2140   GetFileType [static]
2141       Get type of file given file name.
2142
2143           my $type = Image::ExifTool::GetFileType($filename);
2144           my $desc = Image::ExifTool::GetFileType($filename, 1);
2145
2146       Inputs:
2147           0) [optional] File name (or just an extension)
2148
2149           1) [optional] Flag to return a description instead of a type.
2150           Default is undef.  Set to 0 to also return types of recognized but
2151           unsupported files (otherwise the return value for unsupported files
2152           is undef), or 1 to return descriptions.
2153
2154       Return Value:
2155           A string, based on the file extension, which indicates the basic
2156           format of the file.  Note that some files may be based on other
2157           formats (like many RAW image formats are based on TIFF).  In list
2158           context, may return more than one file type if the file may be
2159           based on different formats.  Returns undef if files with this
2160           extension are not yet supported by ExifTool.  Returns a list of
2161           extensions for all supported file types if no input extension is
2162           specified (or all recognized file types if the description flag is
2163           set to 0). Returns a more detailed description of the specific file
2164           format when the description flag is set.
2165
2166   CanWrite [static]
2167       Can the specified file be written?
2168
2169           my $writable = Image::ExifTool::CanWrite($filename);
2170
2171       Inputs:
2172           0) File name or extension
2173
2174       Return Value:
2175           True if ExifTool supports writing files of this type (based on the
2176           file extension).
2177
2178   CanCreate [static]
2179       Can the specified file be created?
2180
2181           my $creatable = Image::ExifTool::CanCreate($filename);
2182
2183       Inputs:
2184           0) File name or extension
2185
2186       Return Value:
2187           True if ExifTool can create files with this extension from scratch.
2188           Currently, this can only be done with XMP, MIE, ICC, VRD, DR4, EXV
2189           and EXIF files.
2190
2191   AddUserDefinedTags [static]
2192       Add user-defined tags to an existing tag table at run time.  This
2193       differs from the usual technique of creating user-defined tags via the
2194       %Image::ExifTool::UserDefined hash (see the ExifTool_config file in the
2195       Image::ExifTool distribution) because it allows tags to be added after
2196       a tag table has been initialized.
2197
2198           use Image::ExifTool ':Public';
2199           my %tags = (
2200               TestTagID1 => { Name => 'TestTagName1' },
2201               TestTagID2 => { Name => 'TestTagName2' },
2202           );
2203           my $num = AddUserDefinedTags('Image::ExifTool::PDF::Info', %tags);
2204
2205       Inputs:
2206           0) Destination tag table name
2207
2208           1-N) Pairs of tag ID / tag information hash references for the new
2209           tags
2210
2211       Return Value:
2212           The number of tags added.
2213
2214       Notes
2215           Pre-existing tags with the same ID will be replaced in the
2216           destination table. See lib/Image/ExifTool/README in the full
2217           distribution for full details on the elements of the tag
2218           information hash.
2219

CHARACTER ENCODINGS

2221       Certain meta information formats allow coded character sets other than
2222       plain ASCII.  When reading, most known encodings are converted to the
2223       external character set according to the "Charset" option, or to UTF-8
2224       by default.  When writing, the inverse conversions are performed.
2225       Alternatively, special characters may be converted to/from HTML
2226       character entities with the "Escape" HTML option.
2227
2228       A distinction is made between the external character set visible via
2229       the ExifTool API, and the internal character used to store text in the
2230       metadata of a file.  These character sets may be specified separately
2231       as follows:
2232
2233       External Character Sets:
2234           The encoding for tag values passed to/from ExifTool API functions
2235           is set via the "Charset" option, which is 'UTF8' by default.
2236
2237           The encoding of file names is specified via the "CharsetFileName"
2238           option.  By default, "CharsetFileName" is not defined, and file
2239           names passed to ExifTool are used directly in calls to the system
2240           i/o routines (which expect UTF-8 strings on Mac/Linux, but default
2241           to the system code page on Windows).  In this mode on Windows a
2242           warning is issued if a file name contains special characters, but
2243           this warning may be avoided by setting "CharsetFileName" to an
2244           empty string.  Setting "CharsetFileName" to any other value causes
2245           file names to be converted from the specified encoding to one
2246           appropriate for the system.  In Windows this also has the effect of
2247           activating Unicode filename support via the special Windows wide-
2248           character i/o routines if Win32API::File is available.
2249
2250       Internal Character Sets:
2251           The encodings used to store strings in the various metadata
2252           formats.  These encodings may be changed for certain types of
2253           metadata via the "CharsetEXIF", "CharsetID3", "CharsetIPTC",
2254           "CharsetPhotoshop", "CharsetQuickTime" and "CharsetRIFF" options.
2255
2256       Values are returned as byte strings of encoded characters.  Perl wide
2257       characters are not used.  By default, most returned strings are encoded
2258       in UTF-8.  For these, Encode::decode_utf8() may be used to convert to a
2259       sequence of logical Perl characters.  Note that some settings of the
2260       PERL_UNICODE environment variable may be incompatible with ExifTool's
2261       character handling.
2262
2263       More specific details are given below about how character coding is
2264       handled for EXIF, IPTC, XMP, PNG, ID3, PDF, Photoshop, QuickTime, AIFF,
2265       MIE and Vorbis information:
2266
2267   EXIF
2268       Most textual information in EXIF is stored in ASCII format (called
2269       "string" in the ExifTool tag name documentation). By default ExifTool
2270       does not convert these strings.  However, it is not uncommon for
2271       applications to write UTF-8 or other encodings where ASCII is expected.
2272       To deal with these, ExifTool allows the internal EXIF string encoding
2273       to be specified with "CharsetEXIF", which causes EXIF string values to
2274       be converted from the specified character set when reading, and stored
2275       with this character set when writing.  (The MWG recommends using UTF-8
2276       encoding for EXIF strings, and in keeping with this the MWG module sets
2277       the default internal EXIF string encoding to UTF-8, but note that this
2278       will have no effect unless the external encoding is also set to
2279       something other than the default of UTF-8.)
2280
2281       A few EXIF tags (UserComment, GPSProcessingMethod and
2282       GPSAreaInformation) support a designated internal text encoding, with
2283       values stored as ASCII, Unicode (UCS-2) or JIS.  When reading these
2284       tags, ExifTool converts Unicode and JIS to the external character set
2285       specified by the "Charset" option, or to UTF-8 by default.  ASCII text
2286       is not converted. When writing, text is stored as ASCII unless the
2287       string contains special characters, in which case it is converted from
2288       the external character set (UTF-8 by default), and stored as Unicode.
2289       ExifTool writes Unicode in native EXIF byte ordering by default, but
2290       the byte order may be specified by setting the ExifUnicodeByteOrder tag
2291       (see the Extra Tags documentation).
2292
2293       The EXIF "XP" tags (XPTitle, XPComment, etc) are always stored as
2294       little-endian Unicode (UCS-2), and are read and written using the
2295       specified character set.
2296
2297   IPTC
2298       The value of the IPTC:CodedCharacterSet tag determines how the internal
2299       IPTC string values are interpreted.  If CodedCharacterSet exists and
2300       has a value of 'UTF8' (or 'ESC % G') then string values are assumed to
2301       be stored as UTF-8, otherwise Windows Latin1 (cp1252, 'Latin') coding
2302       is assumed by default, but this can be changed with the "CharsetIPTC"
2303       option.  When reading, these strings are converted to the character set
2304       specified by the "Charset" option.  When writing, the inverse
2305       conversions are performed.  No conversion is done if the internal
2306       (IPTC) and external (ExifTool) character sets are the same.  Note that
2307       ISO 2022 character set shifting is not supported.  Instead, a warning
2308       is issued and the string is not converted if an ISO 2022 shift code is
2309       encountered.  See <http://www.iptc.org/IIM/> for the official IPTC
2310       specification.
2311
2312       ExifTool may be used to convert IPTC values to a different internal
2313       encoding.  To do this, all IPTC tags must be rewritten along with the
2314       desired value of CodedCharacterSet.  For example, the following command
2315       changes the internal IPTC encoding to UTF-8 (from Windows Latin1 unless
2316       CodedCharacterSet was already 'UTF8'):
2317
2318         exiftool -tagsfromfile @ -iptc:all -codedcharacterset=utf8 a.jpg
2319
2320       or from Windows Latin2 (cp1250) to UTF-8:
2321
2322         exiftool -tagsfromfile @ -iptc:all -codedcharacterset=utf8 \
2323         -charset iptc=latin2 a.jpg
2324
2325       and this command changes it back from UTF-8 to Windows Latin1 (cp1252):
2326
2327         exiftool -tagsfromfile @ -iptc:all -codedcharacterset= a.jpg
2328
2329       or to Windows Latin2:
2330
2331         exiftool -tagsfromfile @ -iptc:all -codedcharacterset= \
2332         -charset iptc=latin2 a.jpg
2333
2334       Unless CodedCharacterSet is 'UTF8', applications have no reliable way
2335       to determine the IPTC character encoding.  For this reason, it is
2336       recommended that CodedCharacterSet be set to 'UTF8' when creating new
2337       IPTC.
2338
2339       (Note: Here, "IPTC" Refers to the older IPTC IIM format.  The more
2340       recent IPTC Core and Extension specifications actually use the XMP
2341       format.)
2342
2343   XMP
2344       Exiftool reads XMP encoded as UTF-8, UTF-16 or UTF-32, and converts
2345       them all to UTF-8 internally.  Also, all XML character entity
2346       references and numeric character references are converted.  When
2347       writing, ExifTool always encodes XMP as UTF-8, converting the following
2348       5 characters to XML character references: & < > ' ".  By default no
2349       further conversion is performed, however if the "Charset" option is
2350       other than 'UTF8' then text is converted to/from a specified character
2351       set when reading/writing.
2352
2353   PNG
2354       PNG TextualData tags are stored as tEXt, zTXt and iTXt chunks in PNG
2355       images.  The tEXt and zTXt chunks use ISO 8859-1 encoding, while iTXt
2356       uses UTF-8.  When reading, ExifTool converts all PNG textual data to
2357       the character set specified by the "Charset" option.  When writing,
2358       ExifTool generates a tEXt chunk (or zTXt with the "Compress" option) if
2359       the text doesn't contain special characters or if Latin encoding is
2360       specified; otherwise an iTXt chunk is used and the text is converted
2361       from the specified character set and stored as UTF-8.
2362
2363   JPEG Comment
2364       The encoding for the JPEG Comment (COM segment) is not specified, so
2365       ExifTool reads/writes this text without conversion.
2366
2367   ID3
2368       The ID3v1 specification officially supports only ISO 8859-1 encoding (a
2369       subset of Windows Latin1), although some applications may incorrectly
2370       use other character sets.  By default ExifTool converts ID3v1 text from
2371       Latin to the character set specified by the "Charset" option.  However,
2372       the internal ID3v1 charset may be specified with the "CharsetID3"
2373       option.  The encoding for ID3v2 information is stored in the file, so
2374       ExifTool converts ID3v2 text from this encoding to the character set
2375       specified by the "Charset" option. ExifTool does not currently write
2376       ID3 information.
2377
2378   PDF
2379       PDF text strings are stored in either PDFDocEncoding (similar to
2380       Windows Latin1) or Unicode (UCS-2).  When reading, ExifTool converts to
2381       the character set specified by the "Charset" option.  When writing,
2382       ExifTool encodes input text from the specified character set as Unicode
2383       only if the string contains special characters, otherwise
2384       PDFDocEncoding is used.
2385
2386   Photoshop
2387       Some Photoshop resource names are stored as Pascal strings with unknown
2388       encoding.  By default, ExifTool assumes MacRoman encoding and converts
2389       this to UTF-8, but the internal and external character sets may be
2390       specified with the "CharsetPhotoshop" and "Charset" options
2391       respectively.
2392
2393   QuickTime
2394       QuickTime text strings may be stored in a variety of poorly document
2395       formats. ExifTool does its best to decode these according to the
2396       "Charset" option setting.  For some QuickTime strings, ExifTool assumes
2397       a default encoding of MacRoman, but this may be changed with the
2398       "CharsetQuickTime" option.
2399
2400   AIFF
2401       AIFF strings are assumed to be stored in MacRoman, and are converted
2402       according to the "Charset" option when reading.
2403
2404   RIFF
2405       The internal encoding of RIFF strings (eg. in AVI and WAV files) is
2406       assumed to be Latin unless otherwise specified by the RIFF CSET chunk
2407       or the "CharsetRIFF" option.
2408
2409   MIE
2410       MIE strings are stored as either UTF-8 or ISO 8859-1. When reading,
2411       UTF-8 strings are converted according to the "Charset" option, and ISO
2412       8859-1 strings are never converted.  When writing, input strings are
2413       converted from the specified character set to UTF-8.  The resulting
2414       strings are stored as UTF-8 if they contain multi-byte UTF-8 character
2415       sequences, otherwise they are stored as ISO 8859-1.
2416
2417   Vorbis
2418       Vorbis comments are stored as UTF-8, and are converted to the character
2419       set specified by the "Charset" option.
2420

AUTHOR

2422       Copyright 2003-2020, Phil Harvey
2423
2424       This library is free software; you can redistribute it and/or modify it
2425       under the same terms as Perl itself.
2426

ACKNOWLEDGEMENTS

2428       Many people have helped in the development of ExifTool through their
2429       bug reports, comments and suggestions, and/or additions to the code.
2430       See the ACKNOWLEDGEMENTS in the individual Image::ExifTool modules and
2431       in html/index.html of the Image::ExifTool distribution package for a
2432       list of people who have contributed to this project.
2433

SEE ALSO

2435       exiftool(1), Image::ExifTool::TagNames(3pm),
2436       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift(3pm),
2437       Image::Info(3pm), Image::MetaData::JPEG(3pm)
2438
2439
2440
2441perl v5.30.1                      2020-01-31                Image::ExifTool(3)
Impressum