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

NAME

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

SYNOPSIS

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

DESCRIPTION

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

CONFIGURATION

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

EXPORTS

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

METHODS

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

CHARACTER ENCODINGS

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

AUTHOR

2373       Copyright 2003-2019, Phil Harvey
2374
2375       This library is free software; you can redistribute it and/or modify it
2376       under the same terms as Perl itself.
2377

ACKNOWLEDGEMENTS

2379       Many people have helped in the development of ExifTool through their
2380       bug reports, comments and suggestions, and/or additions to the code.
2381       See the ACKNOWLEDGEMENTS in the individual Image::ExifTool modules and
2382       in html/index.html of the Image::ExifTool distribution package for a
2383       list of people who have contributed to this project.
2384

SEE ALSO

2386       exiftool(1), Image::ExifTool::TagNames(3pm),
2387       Image::ExifTool::Shortcuts(3pm), Image::ExifTool::Shift(3pm),
2388       Image::Info(3pm), Image::MetaData::JPEG(3pm)
2389
2390
2391
2392perl v5.28.1                      2019-02-22                Image::ExifTool(3)
Impressum