512 changes: 256 additions & 256 deletions config_files/gps2utm.config

Large diffs are not rendered by default.

764 changes: 382 additions & 382 deletions config_files/picasa_faces.config

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions exiftool
Expand Up @@ -12,7 +12,7 @@
use strict;
require 5.004;

my $version = '11.39';
my $version = '11.40';

# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
my $exeDir;
Expand Down Expand Up @@ -3742,9 +3742,7 @@ sub SuggestedExtension($$$)
$ext = 'xml';
} elsif ($$valPt =~ /^RIFF....WAVE/s) {
$ext = 'wav';
} elsif ($tag eq 'OriginalRawFileData' and
defined($ext = $et->GetValue('OriginalRawFileName')))
{
} elsif ($tag eq 'OriginalRawFileData' and defined($ext = $et->GetValue('OriginalRawFileName'))) {
$ext =~ s/^.*\.//s;
$ext = $ext ? lc($ext) : 'raw';
} elsif ($tag eq 'EXIF') {
Expand Down Expand Up @@ -5118,7 +5116,7 @@ with this command:
produces output like this:
-- Generated by ExifTool 11.39 --
-- Generated by ExifTool 11.40 --
File: a.jpg - 2003:10:31 15:44:19
(f/5.6, 1/60s, ISO 100)
File: b.jpg - 2006:05:23 11:57:38
Expand Down
Binary file modified html/ExifTool.pdf
Binary file not shown.
Binary file modified html/Shift.pdf
Binary file not shown.
3 changes: 2 additions & 1 deletion html/TagNames/Canon.html
Expand Up @@ -1670,6 +1670,7 @@ <h2><a name='LensType'>Canon LensType Values</a></h2>
</tr><tr><td>368.3</td><td>= Sigma 40mm f/1.4 DG HSM | A</td>
</tr><tr><td>368.4</td><td>= Sigma 60-600mm f/4.5-6.3 DG OS HSM | S</td>
</tr><tr><td>368.5</td><td>= Sigma 28mm f/1.4 DG HSM | A</td>
</tr><tr><td>368.6</td><td>= Sigma 150-600mm f/5-6.3 DG OS HSM | S</td>
</tr><tr><td>488</td><td>= Canon EF-S 15-85mm f/3.5-5.6 IS USM</td>
</tr><tr><td>489</td><td>= Canon EF 70-300mm f/4-5.6L IS USM</td>
</tr><tr><td>490</td><td>= Canon EF 8-15mm f/4L Fisheye USM</td>
Expand Down Expand Up @@ -10381,7 +10382,7 @@ <h2><a name='Skip'>Canon Skip Tags</a></h2>

<hr>
(This document generated automatically by Image::ExifTool::BuildTagLookup)
<br><i>Last revised May 3, 2019</i>
<br><i>Last revised May 7, 2019</i>
<p class=lf><a href='index.html'>&lt;-- ExifTool Tag Names</a></p>
</body>
</html>
8 changes: 5 additions & 3 deletions html/TagNames/EXIF.html
Expand Up @@ -2346,10 +2346,12 @@ <h2 class=top>EXIF Tags</h2>
<td><u>SceneCaptureType</u></td>
<td class=c>int16u</td>
<td class=c>ExifIFD</td>
<td><span class=s>0 = Standard
<td><span class=s><span class=n>(the value of 4 is non-standard, and used by some Samsung models)</span>
<br>0 = Standard
<br>1 = Landscape
<br>2 = Portrait
<br>3 = Night</span></td></tr>
<br>3 = Night
<br>4 = Other</span></td></tr>
<tr class=b>
<td title='0xa407 = 41991'>0xa407</td>
<td><u>GainControl</u></td>
Expand Down Expand Up @@ -3582,7 +3584,7 @@ <h2><a name='Flash'>EXIF Flash Values</a></h2>

<hr>
(This document generated automatically by Image::ExifTool::BuildTagLookup)
<br><i>Last revised Apr 23, 2019</i>
<br><i>Last revised May 7, 2019</i>
<p class=lf><a href='index.html'>&lt;-- ExifTool Tag Names</a></p>
</body>
</html>
4 changes: 2 additions & 2 deletions html/TagNames/QuickTime.html
Expand Up @@ -20,7 +20,7 @@ <h2 class=top>QuickTime Tags</h2>
otherwise in UserData, but this may be changed by specifying the location.
Alternate language tags may be accessed for ItemList tags by adding a
language-country code to the tag name (eg. &quot;ItemList:Artist-fra-FR&quot;), or for
UserData tags by adding a language code (eg. &quot;UserData:Artist-fra&quot;). If no
UserData tags by adding a language code (eg. &quot;UserData:Artist-fra&quot;). If no
language code is specified when writing, alternate languages are deleted.
Use the &quot;und&quot; language code to write the default language without deleting
alternate languages. Note that &quot;eng&quot; is treated as a default language when
Expand Down Expand Up @@ -7758,7 +7758,7 @@ <h2><a name='ImageFile'>QuickTime ImageFile Tags</a></h2>

<hr>
(This document generated automatically by Image::ExifTool::BuildTagLookup)
<br><i>Last revised May 2, 2019</i>
<br><i>Last revised May 7, 2019</i>
<p class=lf><a href='index.html'>&lt;-- ExifTool Tag Names</a></p>
</body>
</html>
2 changes: 1 addition & 1 deletion html/exiftool_pod.html
Expand Up @@ -639,7 +639,7 @@ <h3 id="Input-output-text-formatting">Input-output text formatting</h3>

<p>produces output like this:</p>

<pre><code> -- Generated by ExifTool 11.39 --
<pre><code> -- Generated by ExifTool 11.40 --
File: a.jpg - 2003:10:31 15:44:19
(f/5.6, 1/60s, ISO 100)
File: b.jpg - 2006:05:23 11:57:38
Expand Down
Binary file modified html/exiftool_pod.pdf
Binary file not shown.
8 changes: 8 additions & 0 deletions html/history.html
Expand Up @@ -17,6 +17,14 @@ <h1 class='up'>ExifTool Version History</h1>
<!-- Use line width of 80 -->
<!-- *********************************************************************** -->

<a name='v11.40'><b>May 7, 2019 - Version 11.40</b></a>
<ul>
<li>Added a new Canon LensType
<li>Added a new value for EXIF:SceneCaptureType used by some Samsung cameras
<li>Fixed QuickTime writing to preserve existing same-named default-language
tags in other groups when writing a default language tag
</ul>

<a name='v11.39'><b>May 3, 2019 - Version 11.39</b></a>
<ul>
<li>Added ability to create new QuickTime tags in MOV/MP4 videos
Expand Down
45 changes: 22 additions & 23 deletions html/index.html

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions html/install.html
Expand Up @@ -52,10 +52,10 @@ <h2><a name="Windows">Windows</a></h2>
<h3>Stand-Alone Executable</h3>
<ol>
<li><b>Download</b> the <b>Windows Executable</b> from the <a href="index.html">ExifTool home page</a>.
<br><span class=lt>(The file you download should be named "<code>exiftool-11.39.zip</code>".)</span></li>
<br><span class=lt>(The file you download should be named "<code>exiftool-11.40.zip</code>".)</span></li>
<li><b>Extract "<code>exiftool(-k).exe</code>"</b> from the
"<code>.zip</code>" file, and place it <b>on your Desktop</b>.
<br><span class=lt>(Double-click on "<code>exiftool-11.39.zip</code>" to open
<br><span class=lt>(Double-click on "<code>exiftool-11.40.zip</code>" to open
the archive, then drag "<code>exiftool(-k).exe</code>" to your Desktop.)</span></li>
</ol>
<p>You can now double-click on "<code>exiftool(-k).exe</code>" to read the
Expand Down Expand Up @@ -107,7 +107,7 @@ <h3>Full Perl Distribution</h3>
<a href="http://www.activestate.com/activeperl/">activeperl.com</a>.)</p>
<ol>
<li><b>Download</b> the <b>Image-ExifTool distribution</b> from the <a href="index.html">ExifTool home page</a>
<br><span class=lt>(The file you download should be named "<code>Image-ExifTool-11.39.tar.gz</code>".)</span></li>
<br><span class=lt>(The file you download should be named "<code>Image-ExifTool-11.40.tar.gz</code>".)</span></li>
<li><b>Extract the ExifTool files</b> from the archive.
<br><span class=lt>(The archive is a gzipped tar file, and can be opened with
various Windows utilities, including WinZip.)</span></li>
Expand Down Expand Up @@ -149,7 +149,7 @@ <h2><a name="OSX">Macintosh OS X</a></h2>
<h3>OS X Package</h3>
<ol>
<li><b>Download</b> the <b>ExifTool OS X Package</b> from the <a href="index.html">ExifTool home page</a>.
<br><span class=lt>(The file you download should be named "<code>ExifTool-11.39.dmg</code>".)</span></li>
<br><span class=lt>(The file you download should be named "<code>ExifTool-11.40.dmg</code>".)</span></li>
<li><b>Install</b> as a normal <b>OS X package</b>.
<br><span class=lt>(Open the disk image, double-click on the install package, and follow the instructions.)
</span></li>
Expand All @@ -164,12 +164,12 @@ <h3>Full Perl Distribution</h3>
<ol>
<li><b>Download</b> the <b>Image-ExifTool distribution</b> from the <a href="index.html">ExifTool home page</a>
to your Desktop.
<br><span class=lt>(The file you download should be named "<code>Image-ExifTool-11.39.tar.gz</code>".)</span></li>
<br><span class=lt>(The file you download should be named "<code>Image-ExifTool-11.40.tar.gz</code>".)</span></li>
<li><b>Launch</b> the <b>Terminal</b> application from the Utilities folder in your Applications folder.</li>
<li>In the Terminal window, <b>type the following</b>:
<pre class='code'> cd ~/Desktop
tar -xzf Image-ExifTool-11.39.tar.gz
cd Image-ExifTool-11.39
tar -xzf Image-ExifTool-11.40.tar.gz
cd Image-ExifTool-11.40
sudo cp -r exiftool lib /usr/local/bin
</pre>
<span class=lt>(Note: The last step above will require you to enter your
Expand All @@ -185,7 +185,7 @@ <h3>Full Perl Distribution</h3>
precedence for exiftool, but /Library/Perl/#.#.# is the default for any other
Perl scripts.</li>
<li>In OS X 10.8 or later, you may see this message when you try to open the install package:
<blockquote class=red>"ExifTool-11.39.pkg" can't be opened because it is from an
<blockquote class=red>"ExifTool-11.40.pkg" can't be opened because it is from an
unidentified developer.</blockquote> The solution is to control-click on the pkg
then select "Open" from the pop-up menu instead of just double-clicking. An alternative
is to lower the security settings by changing "Allow applications downloaded from" to
Expand All @@ -211,11 +211,11 @@ <h2><a name="Unix">Unix Platforms</a></h2>

<ol>
<li><b>Download</b> the <b>Image-ExifTool distribution</b> from the <a href="index.html">ExifTool home page</a>
<br><span class=lt>(The file you download should be named "<code>Image-ExifTool-11.39.tar.gz</code>".)</span></li>
<br><span class=lt>(The file you download should be named "<code>Image-ExifTool-11.40.tar.gz</code>".)</span></li>
<li><b>Unpack the distribution</b> and <b>make it your current directory</b> by typing:
<pre class='code'> cd <i>&lt;your download directory&gt;</i>
gzip -dc Image-ExifTool-11.39.tar.gz | tar -xf -
cd Image-ExifTool-11.39
gzip -dc Image-ExifTool-11.40.tar.gz | tar -xf -
cd Image-ExifTool-11.40
</pre>
<span class=lt>(At this point you may run exiftool by typing
"<code>./exiftool <i>&lt;image file name&gt;</i></code>".)</span></li>
Expand Down
4 changes: 2 additions & 2 deletions lib/Image/ExifTool.pm
Expand Up @@ -27,7 +27,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
%mimeType $swapBytes $swapWords $currentByteOrder %unpackStd
%jpegMarker %specialTags %fileTypeLookup);

$VERSION = '11.39';
$VERSION = '11.40';
$RELEASE = '';
@ISA = qw(Exporter);
%EXPORT_TAGS = (
Expand Down Expand Up @@ -956,7 +956,7 @@ my %allGroupsExifTool = ( 0 => 'ExifTool', 1 => 'ExifTool', 2 => 'ExifTool' );
WRITABLE TABLE_DESC NOTES IS_OFFSET IS_SUBDIR
EXTRACT_UNKNOWN NAMESPACE PREFERRED SRC_TABLE PRIORITY
AVOID WRITE_GROUP LANG_INFO VARS DATAMEMBER
SET_GROUP1
SET_GROUP1 PERMANENT
);

# headers for various segment types
Expand Down
7 changes: 5 additions & 2 deletions lib/Image/ExifTool/BuildTagLookup.pm
Expand Up @@ -34,7 +34,7 @@ use Image::ExifTool::Nikon;
use Image::ExifTool::Validate;
use Image::ExifTool::MacOS;

$VERSION = '3.21';
$VERSION = '3.22';
@ISA = qw(Exporter);

sub NumbersFirst($$);
Expand Down Expand Up @@ -1517,7 +1517,10 @@ sub WriteTagLookup($$)
} elsif ($tagID =~ /^\d+$/) {
$entry = sprintf('0x%x',$tagID);
} else {
$entry = "'${tagID}'";
my $quot = "'";
# escape non-printable characters in tag ID if necessary
$quot = '"' if $tagID =~ s/[\x00-\x1f,\x7f-\xff]/sprintf('\\x%.2x',ord($&))/ge;
$entry = "$quot${tagID}$quot";
}
my $wrNum = $wrNum{$tableNum};
push @entries, "$wrNum => $entry";
Expand Down
3 changes: 2 additions & 1 deletion lib/Image/ExifTool/Canon.pm
Expand Up @@ -87,7 +87,7 @@ sub ProcessCTMD($$$);
sub ProcessExifInfo($$$);
sub SwapWords($);

$VERSION = '4.10';
$VERSION = '4.11';

# Note: Removed 'USM' from 'L' lenses since it is redundant - PH
# (or is it? Ref 32 shows 5 non-USM L-type lenses)
Expand Down Expand Up @@ -440,6 +440,7 @@ $VERSION = '4.10';
368.3 => 'Sigma 40mm f/1.4 DG HSM | A', #IB (018)
368.4 => 'Sigma 60-600mm f/4.5-6.3 DG OS HSM | S', #IB (018)
368.5 => 'Sigma 28mm f/1.4 DG HSM | A', #IB (A019)
368.6 => 'Sigma 150-600mm f/5-6.3 DG OS HSM | S', #50
# Note: LensType 488 (0x1e8) is reported as 232 (0xe8) in 7D CameraSettings
488 => 'Canon EF-S 15-85mm f/3.5-5.6 IS USM', #PH
489 => 'Canon EF 70-300mm f/4-5.6L IS USM', #Gerald Kapounek
Expand Down
5 changes: 3 additions & 2 deletions lib/Image/ExifTool/Exif.pm
Expand Up @@ -55,7 +55,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
use Image::ExifTool qw(:DataAccess :Utils);
use Image::ExifTool::MakerNotes;

$VERSION = '4.14';
$VERSION = '4.15';

sub ProcessExif($$$);
sub WriteExif($$$);
Expand Down Expand Up @@ -2601,12 +2601,13 @@ my %sampleFormat = (
Name => 'SceneCaptureType',
Groups => { 2 => 'Camera' },
Writable => 'int16u',
Notes => 'the value of 4 is non-standard, and used by some Samsung models',
PrintConv => {
0 => 'Standard',
1 => 'Landscape',
2 => 'Portrait',
3 => 'Night',
# 4 - HDR (Samsung GT-I9300)
4 => 'Other', # (non-standard Samsung, ref forum 5724)
},
},
0xa407 => {
Expand Down
4 changes: 3 additions & 1 deletion lib/Image/ExifTool/Lang/tr.pm
Expand Up @@ -11,7 +11,7 @@ package Image::ExifTool::Lang::tr;
use strict;
use vars qw($VERSION);

$VERSION = '1.04';
$VERSION = '1.05';

%Image::ExifTool::Lang::tr::Translate = (
'Album' => 'Albüm',
Expand Down Expand Up @@ -499,6 +499,7 @@ $VERSION = '1.04';
},
'WhitePoint' => 'Beya nokta kromatik',
'Writer-Editor' => 'Açıklama Yazarı',
'XResolution' => 'X çözünürlüğü',
'YCbCrCoefficients' => 'Renk alanı transformasyon matriks katsayısı',
'YCbCrPositioning' => {
Description => 'Y ve C konumlama',
Expand All @@ -508,6 +509,7 @@ $VERSION = '1.04';
},
},
'YCbCrSubSampling' => 'Y den C\'ye alt örnekleme oranı',
'YResolution' => 'Y çözünürlüğü',
);

1; # end
Expand Down
4 changes: 2 additions & 2 deletions lib/Image/ExifTool/Olympus.pm
Expand Up @@ -9,8 +9,8 @@
# References: 1) http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
# 2) http://www.cybercom.net/~dcoffin/dcraw/
# 3) http://www.ozhiker.com/electronics/pjmt/jpeg_info/olympus_mn.html
# 4) Markku H�nninen private communication (tests with E-1)
# 5) R�mi Guyomarch from http://forums.dpreview.com/forums/read.asp?forum=1022&message=12790396
# 4) Markku Hanninen private communication (tests with E-1)
# 5) Remi Guyomarch from http://forums.dpreview.com/forums/read.asp?forum=1022&message=12790396
# 6) Frank Ledwon private communication (tests with E/C-series cameras)
# 7) Michael Meissner private communication
# 8) Shingo Noguchi, PhotoXP (http://www.daifukuya.com/photoxp/)
Expand Down
2 changes: 1 addition & 1 deletion lib/Image/ExifTool/Pentax.pm
Expand Up @@ -3349,7 +3349,7 @@ my %binaryDataAttrs = (
8 => {
Name => 'ExposureBracketStepSize',
# This is set even when Exposure Bracket is Off (and the K10D
# displays --- as the step size when you press the EB button) - DaveN
# displays "---" as the step size when you press the EB button) - DaveN
# because the last value is remembered and if you turn Exposure Bracket
# on the step size goes back to what it was before.
PrintConv => {
Expand Down
4 changes: 3 additions & 1 deletion lib/Image/ExifTool/QuickTime.pm
Expand Up @@ -427,7 +427,7 @@ my %eeBox = (
otherwise in UserData, but this may be changed by specifying the location.
Alternate language tags may be accessed for ItemList tags by adding a
language-country code to the tag name (eg. "ItemList:Artist-fra-FR"), or for
UserData tags by adding a language code (eg. "UserData:Artist-fra"). If no
UserData tags by adding a language code (eg. "UserData:Artist-fra"). If no
language code is specified when writing, alternate languages are deleted.
Use the "und" language code to write the default language without deleting
alternate languages. Note that "eng" is treated as a default language when
Expand Down Expand Up @@ -5346,6 +5346,8 @@ my %eeBox = (
GROUPS => { 1 => 'Keys' },
WRITE_GROUP => 'Keys',
LANG_INFO => \&GetLangInfo,
PRIORITY => 0, # (so empty (deleted) values don't obscure other good values)
PERMANENT => 1, # (can't be deleted)
FORMAT => 'string',
NOTES => q{
This directory contains a list of key names which are used to decode
Expand Down
9 changes: 6 additions & 3 deletions lib/Image/ExifTool/README
Expand Up @@ -14,11 +14,11 @@ the binary data block (floating point IDs allow multiple tags for the same
offset, with the integer part being used for the offset). The corresponding
hash value provides information about the tag (explained later).

Twenty-six special keys (TABLE_NAME, SHORT_NAME, PROCESS_PROC, WRITE_PROC,
Twenty-seven special keys (TABLE_NAME, SHORT_NAME, PROCESS_PROC, WRITE_PROC,
CHECK_PROC, GROUPS, FORMAT, FIRST_ENTRY, TAG_PREFIX, PRINT_CONV, WRITABLE,
TABLE_DESC, NOTES, IS_OFFSET, IS_SUBDIR, EXTRACT_UNKNOWN, NAMESPACE, PREFERRED,
SRC_TABLE, PRIORITY, AVOID, WRITE_GROUP, LANG_INFO, VARS, DATAMEMBER and
SET_GROUP1) are used to provide additional information about a table. The
PERMANENT, SRC_TABLE, PRIORITY, AVOID, WRITE_GROUP, LANG_INFO, VARS, DATAMEMBER
and SET_GROUP1) are used to provide additional information about a table. The
special keys have names that are all capitalized to avoid possible conflicts
with tag keys. Below is an explanation of the meaning of each special key:

Expand Down Expand Up @@ -173,6 +173,9 @@ with tag keys. Below is an explanation of the meaning of each special key:
when calling InitWriteDirs() to write these tags; this avoids creating other
directories for tags which are already being creating in the preferred group.

PERMANENT : Tags in this table are Permanent, and can't be deleted. Maker
notes tags are Permanent by default, without the need to set this property.

SRC_TABLE : Used internally to store the source table name of a user-defined
tag table so the appropriate module can be loaded as required.

Expand Down
116 changes: 58 additions & 58 deletions lib/Image/ExifTool/TagLookup.pm

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/Image/ExifTool/TagNames.pod
Expand Up @@ -23965,7 +23965,7 @@ created QuickTime tags are added in the ItemList location if possible,
otherwise in UserData, but this may be changed by specifying the location.
Alternate language tags may be accessed for ItemList tags by adding a
language-country code to the tag name (eg. "ItemList:Artist-fra-FR"), or for
UserData tags by adding a language code (eg. "UserData:Artist-fra"). If no
UserData tags by adding a language code (eg. "UserData:Artist-fra"). If no
language code is specified when writing, alternate languages are deleted.
Use the "und" language code to write the default language without deleting
alternate languages. Note that "eng" is treated as a default language when
Expand Down
2 changes: 1 addition & 1 deletion lib/Image/ExifTool/WritePostScript.pl
Expand Up @@ -156,7 +156,7 @@ ($$$$$)
# it would be really difficult to delete the XMP,
# so instead we write a blank XMP record
$val = <<EMPTY_XMP;
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?xpacket begin='\xef\xbb\xbf' id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool $Image::ExifTool::VERSION'>
</x:xmpmeta>
EMPTY_XMP
Expand Down
61 changes: 35 additions & 26 deletions lib/Image/ExifTool/WriteQuickTime.pl
Expand Up @@ -41,7 +41,7 @@ package Image::ExifTool::QuickTime;
int8u => 0x16, int16u => 0x16, int32u => 0x16,
float => 0x17, double => 0x18,
);
my $undLang = 0x55c4; # numeric code for 'und' language
my $undLang = 0x55c4; # numeric code for default ('und') language

# mark UserData tags that don't have ItemList counterparts as Preferred
# (and for now, set Writable to 0 for any tag with a RawConv)
Expand Down Expand Up @@ -128,6 +128,7 @@ ($$)
# Returns: true on success
# Notes: see also ParseItemLocation() in QuickTime.pm
# (variable names with underlines correspond to names in ISO14496-12)
# (see ISO14496-12_base_media_file_format_2015.pdf page 79)
sub Handle_iloc($$$$)
{
my ($et, $dirInfo, $dataPt, $outfile) = @_;
Expand Down Expand Up @@ -519,17 +520,25 @@ ($$$)
$langInfo = $tagInfo;
my $delTag = $delQt;
my $newVal;
if ($lang or $ctry or not $nvHash) {
my $langCode = GetLangCode($lang, $ctry, 1);
if ($langCode) { # (ie. not default language)
if ($$tagInfo{KeysInfo}) {
$langInfo = GetLangInfo($$tagInfo{KeysInfo}, $langCode);
} else {
$langInfo = GetLangInfo($tagInfo, $langCode);
}
$nvHash = $et->GetNewValueHash($langInfo);
# set flag to delete language tag when writing default
$delTag = 1 if not $nvHash and $nvHashNoLang;
my $langCode = GetLangCode($lang, $ctry, 1);
for (;;) {
if ($$tagInfo{KeysInfo}) {
$langInfo = GetLangInfo($$tagInfo{KeysInfo}, $langCode);
} else {
$langInfo = GetLangInfo($tagInfo, $langCode);
}
$nvHash = $et->GetNewValueHash($langInfo);
last if $nvHash or not $ctry or $lang ne $undLang or length($langCode)==2;
# check to see if tag was written with a 2-char country code only
$langCode = lc unpack('a2',pack('n',$ctry));
}
# set flag to delete language tag when writing default
# (except for a default-language Keys entry)
if (not $nvHash and $nvHashNoLang) {
if ($lang eq $undLang and not $ctry and not $didTag{$nvHashNoLang}) {
$nvHash = $nvHashNoLang; # write existing default
} else {
$delTag = 1; # delete tag
}
}
last if $pos + $len > $size;
Expand Down Expand Up @@ -608,19 +617,19 @@ ($$$)
my $enc = $val=~s/^\xfe\xff// ? 'UTF16' : 'UTF8';
$val = $et->Decode($val, $enc);
}
if ($lang or not $nvHash) {
my $langCode = UnpackLang($lang, 1);
if ($langCode) {
$langInfo = GetLangInfo($tagInfo, $langCode);
# (no need to check $$tagInfo{KeysInfo} because Keys won't get here)
$nvHash = $et->GetNewValueHash($langInfo);
if (not $nvHash and $nvHashNoLang and $canCreate) {
# delete other languages when writing default
my $grp = $et->GetGroup($langInfo, 1);
$et->VerboseValue("- $grp:$$langInfo{Name}", $val);
++$$et{CHANGED};
next;
}
my $langCode = UnpackLang($lang, 1);
$langInfo = GetLangInfo($tagInfo, $langCode);
# (no need to check $$tagInfo{KeysInfo} because Keys won't get here)
$nvHash = $et->GetNewValueHash($langInfo);
if (not $nvHash and $nvHashNoLang) {
if ($lang eq $undLang and not $didTag{$nvHashNoLang}) {
$nvHash = $nvHashNoLang;
} elsif ($canCreate) {
# delete other languages when writing default
my $grp = $et->GetGroup($langInfo, 1);
$et->VerboseValue("- $grp:$$langInfo{Name}", $val);
++$$et{CHANGED};
next;
}
}
}
Expand Down Expand Up @@ -720,7 +729,7 @@ ($$$)
}
next unless defined $newVal;
my ($ctry, $lang) = (0,0);
if (length $tag > 4) {
if (length $tag > 4) { # (is there a language code appended to the tag ID?)
unless ($tag =~ s/(.{4})-([A-Z]{3})?[-_]?([A-Z]{2})?/$1/si) {
$et->Warn("Invalid language code for $$tagInfo{Name}");
next;
Expand Down
16 changes: 12 additions & 4 deletions lib/Image/ExifTool/Writer.pl
Expand Up @@ -618,9 +618,14 @@ ($;$$%)
# can't yet write PreviewIFD tags (except for image)
$lcWant eq 'PreviewIFD' and ++$foundMatch, next TAG;
$writeGroup = $ifdName; # write to the specified IFD
} elsif ($grp[0] eq 'QuickTime' and $grp[1] eq 'Track#') {
next TAG unless $movGroup and $lcWant eq lc($movGroup);
$writeGroup = $movGroup;
} elsif ($grp[0] eq 'QuickTime') {
if ($grp[1] eq 'Track#') {
next TAG unless $movGroup and $lcWant eq lc($movGroup);
$writeGroup = $movGroup;
} elsif ($$tagInfo{Table}{WRITE_GROUP}) {
next TAG unless $lcWant eq lc $$tagInfo{Table}{WRITE_GROUP};
$writeGroup = $$tagInfo{Table}{WRITE_GROUP};
}
} elsif ($grp[0] eq 'MIE') {
next TAG unless $mieGroup and $lcWant eq lc($mieGroup);
$writeGroup = $mieGroup; # write to specific MIE group
Expand Down Expand Up @@ -735,7 +740,9 @@ ($;$$%)
my $priority = $tagPriority{$tagInfo} or next;
next if $priority == $highestPriority{$lcTag};
next if $priority < $nextHighest;
next if $$tagInfo{Avoid} or $$tagInfo{Permanent};
my $permanent = $$tagInfo{Permanent};
$permanent = $$tagInfo{Table}{PERMANENT} unless defined $permanent;
next if $$tagInfo{Avoid} or $permanent;
next if $writeGroup{$tagInfo} eq 'MakerNotes';
if ($nextHighest < $priority) {
$nextHighest = $priority;
Expand Down Expand Up @@ -768,6 +775,7 @@ ($;$$%)
my $noConv;
my $writeGroup = $writeGroup{$tagInfo};
my $permanent = $$tagInfo{Permanent};
$permanent = $$tagInfo{Table}{PERMANENT} unless defined $permanent;
$writeGroup eq 'MakerNotes' and $permanent = 1 unless defined $permanent;
my $wgrp1 = $self->GetWriteGroup1($tagInfo, $writeGroup);
$tag = $$tagInfo{Name}; # get tag name for warnings
Expand Down
2 changes: 1 addition & 1 deletion perl-Image-ExifTool.spec
@@ -1,6 +1,6 @@
Summary: perl module for image data extraction
Name: perl-Image-ExifTool
Version: 11.39
Version: 11.40
Release: 1
License: Artistic/GPL
Group: Development/Libraries/Perl
Expand Down
8 changes: 4 additions & 4 deletions pp_build_exe.args
Expand Up @@ -21,10 +21,10 @@
# 10) Copy zip archive to web servers.
# 11) Update zip file version in link and text of html/index.html.
#------------------------------------------------------------------------------
-T exiftool-11.39
#--info=FileVersion=11.3.9.0
#--info=ProductVersion=11.3.9.0
##"--info=Build Date=2019:05:03 11:22:36-04:00"
-T exiftool-11.40
#--info=FileVersion=11.4.0.0
#--info=ProductVersion=11.4.0.0
##"--info=Build Date=2019:05:07 08:49:13-04:00"
##"--info=Bundled Perl Version=ActivePerl 5.24.0"
##"--info=LegalCopyright=Copyright (c) 2003-2019, Phil Harvey"
##"--info=ProductName=ExifTool"
Expand Down
8 changes: 4 additions & 4 deletions t/Lang_16.out
@@ -1,8 +1,8 @@
[EXIF, IFD0, Camera] 271 - Üretici: FUJIFILM
[EXIF, IFD0, Camera] 272 - Kamera: FinePix2400Zoom
[EXIF, IFD0, Image] 274 - Yönelim: Pozitif yön
[EXIF, IFD0, Image] 282 - X Resolution: 72
[EXIF, IFD0, Image] 283 - Y Resolution: 72
[EXIF, IFD0, Image] 282 - X çözünürlüğü: 72
[EXIF, IFD0, Image] 283 - Y çözünürlüğü: 72
[EXIF, IFD0, Image] 296 - X ve Y birim çözünürlüğü: inç
[EXIF, IFD0, Image] 305 - Kullanılan yazılım: Digital Camera FinePix2400Zoom Ver1.70
[EXIF, IFD0, Time] 306 - Dosya değişim tarih ve zamanı: 2001:05:19 18:36:41
Expand Down Expand Up @@ -38,8 +38,8 @@
[EXIF, ExifIFD, Image] 41729 - Senaryo tipi: Doğrudan fotograflanmış imaj
[EXIF, IFD1, Image] 259 - Sıkıştırma planı: JPEG (old-style)
[EXIF, IFD1, Image] 274 - Yönelim: Pozitif yön
[EXIF, IFD1, Image] 282 - X Resolution: 72
[EXIF, IFD1, Image] 283 - Y Resolution: 72
[EXIF, IFD1, Image] 282 - X çözünürlüğü: 72
[EXIF, IFD1, Image] 283 - Y çözünürlüğü: 72
[EXIF, IFD1, Image] 296 - X ve Y birim çözünürlüğü: inç
[EXIF, IFD1, Image] 513 - Thumbnail Offset: 1096
[EXIF, IFD1, Image] 514 - Thumbnail Length: 28
Expand Down
7 changes: 4 additions & 3 deletions t/QuickTime_7.out
@@ -1,7 +1,8 @@
[QuickTime, Keys, Other] 1.2 - Artist:
[QuickTime, Keys, Other] 1.2 - Artist: me
[QuickTime, UserData, Video] �alb - Album: albumA
[QuickTime, UserData, Video] �ART - Artist: me
[QuickTime, UserData, Video] �gen - Genre: rock
[QuickTime, ItemList, Audio] �ART - Artist: me
[QuickTime, ItemList, Audio] �alb - Album: albumB
[QuickTime, ItemList, Audio] �cmt-fra-FR - Comment (fra-FR): fr comment
[QuickTime, UserData, Video] �alb - Album: albumA
[QuickTime, UserData, Video] �gen - Genre: rock
[QuickTime, UserData, Video] �mod - Model: model
8 changes: 3 additions & 5 deletions windows_exiftool
Expand Up @@ -12,7 +12,7 @@
use strict;
require 5.004;

my $version = '11.39';
my $version = '11.40';

# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
my $exeDir;
Expand Down Expand Up @@ -3742,9 +3742,7 @@ sub SuggestedExtension($$$)
$ext = 'xml';
} elsif ($$valPt =~ /^RIFF....WAVE/s) {
$ext = 'wav';
} elsif ($tag eq 'OriginalRawFileData' and
defined($ext = $et->GetValue('OriginalRawFileName')))
{
} elsif ($tag eq 'OriginalRawFileData' and defined($ext = $et->GetValue('OriginalRawFileName'))) {
$ext =~ s/^.*\.//s;
$ext = $ext ? lc($ext) : 'raw';
} elsif ($tag eq 'EXIF') {
Expand Down Expand Up @@ -5138,7 +5136,7 @@ OPTIONS

produces output like this:

-- Generated by ExifTool 11.39 --
-- Generated by ExifTool 11.40 --
File: a.jpg - 2003:10:31 15:44:19
(f/5.6, 1/60s, ISO 100)
File: b.jpg - 2006:05:23 11:57:38
Expand Down