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         360   r/w   | DR4   r/w/c | JNG   r/w   | ODP   r     | RIFF  r
58         3FR   r     | DSS   r     | JP2   r/w   | ODS   r     | RSRC  r
59         3G2   r/w   | DV    r     | JPEG  r/w   | ODT   r     | RTF   r
60         3GP   r/w   | DVB   r/w   | JSON  r     | OFR   r     | RW2   r/w
61         A     r     | DVR-MS r    | JXL   r     | OGG   r     | RWL   r/w
62         AA    r     | DYLIB r     | K25   r     | OGV   r     | RWZ   r
63         AAE   r     | EIP   r     | KDC   r     | ONP   r     | RM    r
64         AAX   r/w   | EPS   r/w   | KEY   r     | OPUS  r     | SEQ   r
65         ACR   r     | EPUB  r     | LA    r     | ORF   r/w   | SKETCH r
66         AFM   r     | ERF   r/w   | LFP   r     | ORI   r/w   | SO    r
67         AI    r/w   | EXE   r     | LIF   r     | OTF   r     | SR2   r/w
68         AIFF  r     | EXIF  r/w/c | LNK   r     | PAC   r     | SRF   r
69         APE   r     | EXR   r     | LRV   r/w   | PAGES r     | SRW   r/w
70         ARQ   r/w   | EXV   r/w/c | M2TS  r     | PBM   r/w   | SVG   r
71         ARW   r/w   | F4A/V r/w   | M4A/V r/w   | PCD   r     | SWF   r
72         ASF   r     | FFF   r/w   | MACOS r     | PCX   r     | THM   r/w
73         AVI   r     | FITS  r     | MAX   r     | PDB   r     | TIFF  r/w
74         AVIF  r/w   | FLA   r     | MEF   r/w   | PDF   r/w   | TORRENT r
75         AZW   r     | FLAC  r     | MIE   r/w/  | PEF   r/w   | TTC   r
76         BMP   r     | FLIF  r/w   | MIFF  r   c | PFA   r     | TTF   r
77         BPG   r     | FLV   r     | MKA   r     | PFB   r     | TXT   r
78         BTF   r     | FPF   r     | MKS   r     | PFM   r     | VCF   r
79         CHM   r     | FPX   r     | MKV   r     | PGF   r     | VRD   r/w/c
80         COS   r     | GIF   r/w   | MNG   r/w   | PGM   r/w   | VSD   r
81         CR2   r/w   | GPR   r/w   | MOBI  r     | PLIST r     | WAV   r
82         CR3   r/w   | GZ    r     | MODD  r     | PICT  r     | WDP   r/w
83         CRM   r/w   | HDP   r/w   | MOI   r     | PMP   r     | WEBP  r
84         CRW   r/w   | HDR   r     | MOS   r/w   | PNG   r/w   | WEBM  r
85         CS1   r/w   | HEIC  r/w   | MOV   r/w   | PPM   r/w   | WMA   r
86         CSV   r     | HEIF  r/w   | MP3   r     | PPT   r     | WMV   r
87         CZI   r     | HTML  r     | MP4   r/w   | PPTX  r     | WTV   r
88         DCM   r     | ICC   r/w/c | MPC   r     | PS    r/w   | WV    r
89         DCP   r/w   | ICS   r     | MPG   r     | PSB   r/w   | X3F   r/w
90         DCR   r     | IDML  r     | MPO   r/w   | PSD   r/w   | XCF   r
91         DFONT r     | IIQ   r/w   | MQV   r/w   | PSP   r     | XLS   r
92         DIVX  r     | IND   r/w   | MRC   r     | QTIF  r/w   | XLSX  r
93         DJVU  r     | INSP  r/w   | MRW   r/w   | R3D   r     | XMP   r/w/c
94         DLL   r     | INSV  r     | MXF   r     | RA    r     | ZIP   r
95         DNG   r/w   | INX   r     | NEF   r/w   | RAF   r/w   |
96         DOC   r     | ISO   r     | NRW   r/w   | RAM   r     |
97         DOCX  r     | ITC   r     | NUMBERS r   | RAR   r     |
98         DPX   r     | J2C   r     | O     r     | RAW   r/w   |
99
100         Meta Information
101         ----------------------+----------------------+---------------------
102         EXIF           r/w/c  |  CIFF           r/w  |  Ricoh RMETA    r
103         GPS            r/w/c  |  AFCP           r/w  |  Picture Info   r
104         IPTC           r/w/c  |  Kodak Meta     r/w  |  Adobe APP14    r
105         XMP            r/w/c  |  FotoStation    r/w  |  MPF            r
106         MakerNotes     r/w/c  |  PhotoMechanic  r/w  |  Stim           r
107         Photoshop IRB  r/w/c  |  JPEG 2000      r    |  DPX            r
108         ICC Profile    r/w/c  |  DICOM          r    |  APE            r
109         MIE            r/w/c  |  Flash          r    |  Vorbis         r
110         JFIF           r/w/c  |  FlashPix       r    |  SPIFF          r
111         Ducky APP12    r/w/c  |  QuickTime      r    |  DjVu           r
112         PDF            r/w/c  |  Matroska       r    |  M2TS           r
113         PNG            r/w/c  |  MXF            r    |  PE/COFF        r
114         Canon VRD      r/w/c  |  PrintIM        r    |  AVCHD          r
115         Nikon Capture  r/w/c  |  FLAC           r    |  ZIP            r
116         GeoTIFF        r/w/c  |  ID3            r    |  (and more)
117

CONFIGURATION

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

EXPORTS

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

METHODS

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

CHARACTER ENCODINGS

2294       Certain meta information formats allow coded character sets other than
2295       plain ASCII.  When reading, most known encodings are converted to the
2296       external character set according to the "Charset" option, or to UTF-8
2297       by default.  When writing, the inverse conversions are performed.
2298       Alternatively, special characters may be converted to/from HTML
2299       character entities with the "Escape" HTML option.
2300
2301       A distinction is made between the external character set visible via
2302       the ExifTool API, and the internal character used to store text in the
2303       metadata of a file.  These character sets may be specified separately
2304       as follows:
2305
2306       External Character Sets:
2307           The encoding for tag values passed to/from ExifTool API functions
2308           is set via the "Charset" option, which is 'UTF8' by default.
2309
2310           The encoding of file names is specified via the "CharsetFileName"
2311           option.  By default, "CharsetFileName" is not defined, and file
2312           names passed to ExifTool are used directly in calls to the system
2313           i/o routines (which expect UTF-8 strings on Mac/Linux, but default
2314           to the system code page on Windows).  In this mode on Windows a
2315           warning is issued if a file name contains special characters, but
2316           this warning may be avoided by setting "CharsetFileName" to an
2317           empty string.  Setting "CharsetFileName" to any other value causes
2318           file names to be converted from the specified encoding to one
2319           appropriate for the system.  In Windows this also has the effect of
2320           activating Unicode filename support via the special Windows wide-
2321           character i/o routines if Win32API::File is available.
2322
2323       Internal Character Sets:
2324           The encodings used to store strings in the various metadata
2325           formats.  These encodings may be changed for certain types of
2326           metadata via the "CharsetEXIF", "CharsetID3", "CharsetIPTC",
2327           "CharsetPhotoshop", "CharsetQuickTime" and "CharsetRIFF" options.
2328
2329       Values are returned as byte strings of encoded characters.  Perl wide
2330       characters are not used.  By default, most returned strings are encoded
2331       in UTF-8.  For these, Encode::decode_utf8() may be used to convert to a
2332       sequence of logical Perl characters.  Note that some settings of the
2333       PERL_UNICODE environment variable may be incompatible with ExifTool's
2334       character handling.
2335
2336       More specific details are given below about how character coding is
2337       handled for EXIF, IPTC, XMP, PNG, ID3, PDF, Photoshop, QuickTime, AIFF,
2338       MIE and Vorbis information:
2339
2340   EXIF
2341       Most textual information in EXIF is stored in ASCII format (called
2342       "string" in the ExifTool tag name documentation). By default ExifTool
2343       does not convert these strings.  However, it is not uncommon for
2344       applications to write UTF-8 or other encodings where ASCII is expected.
2345       To deal with these, ExifTool allows the internal EXIF string encoding
2346       to be specified with "CharsetEXIF", which causes EXIF string values to
2347       be converted from the specified character set when reading, and stored
2348       with this character set when writing.  (The MWG recommends using UTF-8
2349       encoding for EXIF strings, and in keeping with this the MWG module sets
2350       the default internal EXIF string encoding to UTF-8, but note that this
2351       will have no effect unless the external encoding is also set to
2352       something other than the default of UTF-8.)
2353
2354       A few EXIF tags (UserComment, GPSProcessingMethod and
2355       GPSAreaInformation) support a designated internal text encoding, with
2356       values stored as ASCII, Unicode (UCS-2) or JIS.  When reading these
2357       tags, ExifTool converts Unicode and JIS to the external character set
2358       specified by the "Charset" option, or to UTF-8 by default.  ASCII text
2359       is not converted. When writing, text is stored as ASCII unless the
2360       string contains special characters, in which case it is converted from
2361       the external character set (UTF-8 by default), and stored as Unicode.
2362       ExifTool writes Unicode in native EXIF byte ordering by default, but
2363       the byte order may be specified by setting the ExifUnicodeByteOrder tag
2364       (see the Extra Tags documentation).
2365
2366       The EXIF "XP" tags (XPTitle, XPComment, etc) are always stored as
2367       little-endian Unicode (UCS-2), and are read and written using the
2368       specified character set.
2369
2370   IPTC
2371       The value of the IPTC:CodedCharacterSet tag determines how the internal
2372       IPTC string values are interpreted.  If CodedCharacterSet exists and
2373       has a value of 'UTF8' (or 'ESC % G') then string values are assumed to
2374       be stored as UTF-8, otherwise Windows Latin1 (cp1252, 'Latin') coding
2375       is assumed by default, but this can be changed with the "CharsetIPTC"
2376       option.  When reading, these strings are converted to the character set
2377       specified by the "Charset" option.  When writing, the inverse
2378       conversions are performed.  No conversion is done if the internal
2379       (IPTC) and external (ExifTool) character sets are the same.  Note that
2380       ISO 2022 character set shifting is not supported.  Instead, a warning
2381       is issued and the string is not converted if an ISO 2022 shift code is
2382       encountered.  See <http://www.iptc.org/IIM/> for the official IPTC
2383       specification.
2384
2385       ExifTool may be used to convert IPTC values to a different internal
2386       encoding.  To do this, all IPTC tags must be rewritten along with the
2387       desired value of CodedCharacterSet.  For example, the following command
2388       changes the internal IPTC encoding to UTF-8 (from Windows Latin1 unless
2389       CodedCharacterSet was already 'UTF8'):
2390
2391         exiftool -tagsfromfile @ -iptc:all -codedcharacterset=utf8 a.jpg
2392
2393       or from Windows Latin2 (cp1250) to UTF-8:
2394
2395         exiftool -tagsfromfile @ -iptc:all -codedcharacterset=utf8 \
2396         -charset iptc=latin2 a.jpg
2397
2398       and this command changes it back from UTF-8 to Windows Latin1 (cp1252):
2399
2400         exiftool -tagsfromfile @ -iptc:all -codedcharacterset= a.jpg
2401
2402       or to Windows Latin2:
2403
2404         exiftool -tagsfromfile @ -iptc:all -codedcharacterset= \
2405         -charset iptc=latin2 a.jpg
2406
2407       Unless CodedCharacterSet is 'UTF8', applications have no reliable way
2408       to determine the IPTC character encoding.  For this reason, it is
2409       recommended that CodedCharacterSet be set to 'UTF8' when creating new
2410       IPTC.
2411
2412       (Note: Here, "IPTC" Refers to the older IPTC IIM format.  The more
2413       recent IPTC Core and Extension specifications actually use the XMP
2414       format.)
2415
2416   XMP
2417       ExifTool reads XMP encoded as UTF-8, UTF-16 or UTF-32, and converts
2418       them all to UTF-8 internally.  Also, all XML character entity
2419       references and numeric character references are converted.  When
2420       writing, ExifTool always encodes XMP as UTF-8, converting the following
2421       5 characters to XML character references: & < > ' ".  By default no
2422       further conversion is performed, however if the "Charset" option is
2423       other than 'UTF8' then text is converted to/from the specified
2424       character set when reading/writing.
2425
2426   PNG
2427       PNG TextualData tags are stored as tEXt, zTXt and iTXt chunks in PNG
2428       images.  The tEXt and zTXt chunks use ISO 8859-1 encoding, while iTXt
2429       uses UTF-8.  When reading, ExifTool converts all PNG textual data to
2430       the character set specified by the "Charset" option.  When writing,
2431       ExifTool generates a tEXt chunk (or zTXt with the "Compress" option) if
2432       the text doesn't contain special characters or if Latin encoding is
2433       specified; otherwise an iTXt chunk is used and the text is converted
2434       from the specified character set and stored as UTF-8.
2435
2436   JPEG Comment
2437       The encoding for the JPEG Comment (COM segment) is not specified, so
2438       ExifTool reads/writes this text without conversion.
2439
2440   ID3
2441       The ID3v1 specification officially supports only ISO 8859-1 encoding (a
2442       subset of Windows Latin1), although some applications may incorrectly
2443       use other character sets.  By default ExifTool converts ID3v1 text from
2444       Latin to the character set specified by the "Charset" option.  However,
2445       the internal ID3v1 charset may be specified with the "CharsetID3"
2446       option.  The encoding for ID3v2 information is stored in the file, so
2447       ExifTool converts ID3v2 text from this encoding to the character set
2448       specified by the "Charset" option. ExifTool does not currently write
2449       ID3 information.
2450
2451   PDF
2452       PDF text strings are stored in either PDFDocEncoding (similar to
2453       Windows Latin1) or Unicode (UCS-2).  When reading, ExifTool converts to
2454       the character set specified by the "Charset" option.  When writing,
2455       ExifTool encodes input text from the specified character set as Unicode
2456       only if the string contains special characters, otherwise
2457       PDFDocEncoding is used.
2458
2459   Photoshop
2460       Some Photoshop resource names are stored as Pascal strings with unknown
2461       encoding.  By default, ExifTool assumes MacRoman encoding and converts
2462       this to UTF-8, but the internal and external character sets may be
2463       specified with the "CharsetPhotoshop" and "Charset" options
2464       respectively.
2465
2466   QuickTime
2467       QuickTime text strings may be stored in a variety of poorly document
2468       formats. ExifTool does its best to decode these according to the
2469       "Charset" option setting.  For some QuickTime strings, ExifTool assumes
2470       a default encoding of MacRoman, but this may be changed with the
2471       "CharsetQuickTime" option.
2472
2473   AIFF
2474       AIFF strings are assumed to be stored in MacRoman, and are converted
2475       according to the "Charset" option when reading.
2476
2477   RIFF
2478       The internal encoding of RIFF strings (eg. in AVI and WAV files) is
2479       assumed to be Latin unless otherwise specified by the RIFF CSET chunk
2480       or the "CharsetRIFF" option.
2481
2482   MIE
2483       MIE strings are stored as either UTF-8 or ISO 8859-1. When reading,
2484       UTF-8 strings are converted according to the "Charset" option, and ISO
2485       8859-1 strings are never converted.  When writing, input strings are
2486       converted from the specified character set to UTF-8.  The resulting
2487       strings are stored as UTF-8 if they contain multi-byte UTF-8 character
2488       sequences, otherwise they are stored as ISO 8859-1.
2489
2490   Vorbis
2491       Vorbis comments are stored as UTF-8, and are converted to the character
2492       set specified by the "Charset" option.
2493

AUTHOR

2495       Copyright 2003-2021, Phil Harvey
2496
2497       This library is free software; you can redistribute it and/or modify it
2498       under the same terms as Perl itself.
2499

ACKNOWLEDGEMENTS

2501       Many people have helped in the development of ExifTool through their
2502       bug reports, comments and suggestions, and/or additions to the code.
2503       See the ACKNOWLEDGEMENTS in the individual Image::ExifTool modules and
2504       in html/index.html of the Image::ExifTool distribution package for a
2505       list of people who have contributed to this project.
2506

SEE ALSO

2508       exiftool(1), Image::ExifTool::TagNames(3pm),
2509       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift(3pm),
2510       Image::Info(3pm), Image::MetaData::JPEG(3pm)
2511
2512
2513
2514perl v5.34.0                      2022-01-25                Image::ExifTool(3)
Impressum