exiftool-vendored.pl 12.82.0 → 12.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/bin/Changes +37 -0
  2. package/bin/MANIFEST +2 -18
  3. package/bin/META.json +1 -1
  4. package/bin/META.yml +1 -1
  5. package/bin/README +3 -2
  6. package/bin/build_geolocation +872 -0
  7. package/bin/config_files/example.config +2 -2
  8. package/bin/exiftool +28 -6
  9. package/bin/fmt_files/gpx.fmt +2 -1
  10. package/bin/fmt_files/gpx_wpt.fmt +2 -1
  11. package/bin/lib/Image/ExifTool/Apple.pm +51 -7
  12. package/bin/lib/Image/ExifTool/BuildTagLookup.pm +5 -2
  13. package/bin/lib/Image/ExifTool/CanonVRD.pm +18 -5
  14. package/bin/lib/Image/ExifTool/DJI.pm +29 -0
  15. package/bin/lib/Image/ExifTool/Exif.pm +19 -2
  16. package/bin/lib/Image/ExifTool/GM.pm +17 -8
  17. package/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  18. package/bin/lib/Image/ExifTool/Geolocation.pm +163 -101
  19. package/bin/lib/Image/ExifTool/Geotag.pm +18 -10
  20. package/bin/lib/Image/ExifTool/Nikon.pm +7 -6
  21. package/bin/lib/Image/ExifTool/QuickTime.pm +6 -1
  22. package/bin/lib/Image/ExifTool/QuickTimeStream.pl +5 -0
  23. package/bin/lib/Image/ExifTool/Sony.pm +15 -6
  24. package/bin/lib/Image/ExifTool/TagLookup.pm +18 -9
  25. package/bin/lib/Image/ExifTool/TagNames.pod +24 -5
  26. package/bin/lib/Image/ExifTool/WriteQuickTime.pl +2 -1
  27. package/bin/lib/Image/ExifTool/Writer.pl +165 -132
  28. package/bin/lib/Image/ExifTool/XMP2.pl +3 -0
  29. package/bin/lib/Image/ExifTool.pm +45 -23
  30. package/bin/lib/Image/ExifTool.pod +23 -14
  31. package/bin/perl-Image-ExifTool.spec +1 -1
  32. package/bin/pp_build_exe.args +4 -4
  33. package/package.json +2 -2
  34. package/bin/lib/Image/ExifTool/GeoLang/cs.pm +0 -978
  35. package/bin/lib/Image/ExifTool/GeoLang/de.pm +0 -1975
  36. package/bin/lib/Image/ExifTool/GeoLang/en_ca.pm +0 -44
  37. package/bin/lib/Image/ExifTool/GeoLang/en_gb.pm +0 -124
  38. package/bin/lib/Image/ExifTool/GeoLang/es.pm +0 -2921
  39. package/bin/lib/Image/ExifTool/GeoLang/fi.pm +0 -1116
  40. package/bin/lib/Image/ExifTool/GeoLang/fr.pm +0 -3171
  41. package/bin/lib/Image/ExifTool/GeoLang/it.pm +0 -2750
  42. package/bin/lib/Image/ExifTool/GeoLang/ja.pm +0 -10256
  43. package/bin/lib/Image/ExifTool/GeoLang/ko.pm +0 -4499
  44. package/bin/lib/Image/ExifTool/GeoLang/nl.pm +0 -1270
  45. package/bin/lib/Image/ExifTool/GeoLang/pl.pm +0 -3019
  46. package/bin/lib/Image/ExifTool/GeoLang/ru.pm +0 -18220
  47. package/bin/lib/Image/ExifTool/GeoLang/sk.pm +0 -441
  48. package/bin/lib/Image/ExifTool/GeoLang/sv.pm +0 -714
  49. package/bin/lib/Image/ExifTool/GeoLang/tr.pm +0 -452
  50. package/bin/lib/Image/ExifTool/GeoLang/zh_cn.pm +0 -2225
  51. package/bin/lib/Image/ExifTool/GeoLang/zh_tw.pm +0 -72
@@ -364,8 +364,8 @@ $Image::ExifTool::QuickTime::Keys{PREFERRED} = 3;
364
364
 
365
365
  # Add user-defined cities to the Geolocation lookup
366
366
  @Image::ExifTool::UserDefined::Geolocation = (
367
- # (city,region,country code,country,timezone,population,lat,lon)
368
- ['Sinemorets','Burgas','BG','Bulgaria','Europe/Sofia',400,42.06115,27.97833],
367
+ # (city,region,subregion,country_code,country,timezone,feature_code,population,lat,lon)
368
+ ['Sinemorets','burgas','Obshtina Tsarevo','BG','','Europe/Sofia','PPL',400,42.06115,27.97833],
369
369
  );
370
370
 
371
371
  #------------------------------------------------------------------------------
package/bin/exiftool CHANGED
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '12.82';
14
+ my $version = '12.84';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -1166,7 +1166,7 @@ for (;;) {
1166
1166
  if (/^p(-?)$/ or /^printformat(-?)$/i) {
1167
1167
  my $fmt = shift;
1168
1168
  if ($pass) {
1169
- LoadPrintFormat($fmt, $1);
1169
+ LoadPrintFormat($fmt, $1 || $binaryOutput);
1170
1170
  # load MWG module now if necessary
1171
1171
  if (not $useMWG and grep /^mwg:/i, @requestTags) {
1172
1172
  $useMWG = 1;
@@ -2244,6 +2244,14 @@ sub GetImageInfo($$)
2244
2244
  if (%printFmt) {
2245
2245
  $et->Options(Duplicates => 1);
2246
2246
  $et->Options(RequestTags => \@requestTags);
2247
+ if ($printFmt{SetTags}) {
2248
+ # initialize options so we can set any tags we want
2249
+ $$et{TAGS_FROM_FILE} = 1;
2250
+ $et->Options(MakerNotes => 1);
2251
+ $et->Options(Struct => 2);
2252
+ $et->Options(List => 1);
2253
+ $et->Options(CoordFormat => '%d %d %.8f') unless $et->Options('CoordFormat');
2254
+ }
2247
2255
  } else {
2248
2256
  @foundTags = @tags;
2249
2257
  }
@@ -2296,8 +2304,8 @@ sub GetImageInfo($$)
2296
2304
  # output using print format file (-p) option
2297
2305
  my ($type, $doc, $grp, $lastDoc, $cache);
2298
2306
  $fileTrailer = '';
2299
- # repeat for each embedded document if necessary
2300
- if ($et->Options('ExtractEmbedded')) {
2307
+ # repeat for each sub-document if necessary
2308
+ if ($$et{DOC_COUNT}) {
2301
2309
  # (cache tag keys if there are sub-documents)
2302
2310
  $lastDoc = $$et{DOC_COUNT} and $cache = { };
2303
2311
  } else {
@@ -4121,6 +4129,7 @@ sub AddPrintFormat($)
4121
4129
  push @{$printFmt{$type}}, $expr;
4122
4130
  # add to list of requested tags
4123
4131
  push @requestTags, $expr =~ /\$\{?((?:[-\w]+:)*[-\w?*]+)/g;
4132
+ $printFmt{SetTags} = 1 if $expr =~ /\bSetTags\b/;
4124
4133
  }
4125
4134
 
4126
4135
  #------------------------------------------------------------------------------
@@ -5642,7 +5651,7 @@ it from subsequent text (and must be used if subsequent text begins with an
5642
5651
  alphanumeric character, hyphen, underline, colon or number sign). Use C<$$>
5643
5652
  to represent a C<$> symbol, and C<$/> for a newline. When the string
5644
5653
  argument is used (ie. I<STR>), a newline is added to the end of the string
5645
- unless B<-p-> is specified.
5654
+ unless B<-p-> is specified or the B<-b> option is used.
5646
5655
 
5647
5656
  Multiple B<-p> options may be used. Lines beginning with C<#[HEAD]> and
5648
5657
  C<#[TAIL]> are output before the first processed file and after the last
@@ -5668,7 +5677,7 @@ with this command:
5668
5677
 
5669
5678
  produces output like this:
5670
5679
 
5671
- -- Generated by ExifTool 12.82 --
5680
+ -- Generated by ExifTool 12.84 --
5672
5681
  File: a.jpg - 2003:10:31 15:44:19
5673
5682
  (f/5.6, 1/60s, ISO 100)
5674
5683
  File: b.jpg - 2006:05:23 11:57:38
@@ -6902,6 +6911,19 @@ sources. An equivalent to the above commands using this feature would be:
6902
6911
 
6903
6912
  exiftool -tagsfromfile @ -keywords -api nodups a.jpg
6904
6913
 
6914
+ C<SetTags>
6915
+
6916
+ Used to set tags in extracted images. With no arguments, copies all tags
6917
+ from the source file to the embedded image:
6918
+
6919
+ exiftool -p '${previewimage;SetTags}' -b a.arw > preview.jpg
6920
+
6921
+ Arguments may be added to copy or set specific tags. Arguments take exactly
6922
+ the same form as those on the command line when copying or writing tags,
6923
+ but without the leading dash. For example:
6924
+
6925
+ exiftool -p '${previewimage;SetTags("comment=test","title<filename")}' ...
6926
+
6905
6927
  =head1 WINDOWS UNICODE FILE NAMES
6906
6928
 
6907
6929
  In Windows, command-line arguments are specified using the current code page
@@ -11,6 +11,7 @@
11
11
  # 2018/01/04 - PH Added IF to be sure position exists
12
12
  # 2018/01/06 - PH Use DateFmt function instead of -d option
13
13
  # 2019/10/24 - PH Preserve sub-seconds in GPSDateTime value
14
+ # 2024/04/11 - PH Use %f feature in GPSDateTime formatting
14
15
  #
15
16
  # Notes: 1) Input file(s) must contain GPSLatitude and GPSLongitude.
16
17
  # 2) The -ee3 option is to extract the full track from video files.
@@ -32,7 +33,7 @@
32
33
  #[IF] $gpslatitude $gpslongitude
33
34
  #[BODY]<trkpt lat="$gpslatitude#" lon="$gpslongitude#">
34
35
  #[BODY] <ele>$gpsaltitude#</ele>
35
- #[BODY] <time>${gpsdatetime#;my ($ss)=/\.\d+/g;DateFmt("%Y-%m-%dT%H:%M:%SZ");s/Z/${ss}Z/ if $ss}</time>
36
+ #[BODY] <time>${gpsdatetime#;DateFmt("%Y-%m-%dT%H:%M:%S%fZ")}</time>
36
37
  #[BODY]</trkpt>
37
38
  #[TAIL]</trkseg>
38
39
  #[TAIL]</trk>
@@ -12,6 +12,7 @@
12
12
  # 2018/01/04 - PH Added IF to be sure position exists
13
13
  # 2018/01/06 - PH Use DateFmt function instead of -d option
14
14
  # 2019/10/24 - PH Preserve sub-seconds in GPSDateTime value
15
+ # 2024/04/11 - PH Use %f feature in GPSDateTime formatting
15
16
  #
16
17
  # Notes: 1) Input file(s) must contain GPSLatitude and GPSLongitude.
17
18
  # 2) The -ee3 option is to extract the full track from video files.
@@ -30,7 +31,7 @@
30
31
  #[IF] $gpslatitude $gpslongitude
31
32
  #[BODY]<wpt lat="$gpslatitude#" lon="$gpslongitude#">
32
33
  #[BODY] <ele>$gpsaltitude#</ele>
33
- #[BODY] <time>${gpsdatetime#;my ($ss)=/\.\d+/g;DateFmt("%Y-%m-%dT%H:%M:%SZ");s/Z/${ss}Z/ if $ss}</time>
34
+ #[BODY] <time>${gpsdatetime#;DateFmt("%Y-%m-%dT%H:%M:%S%fZ")}</time>
34
35
  #[BODY] <name>$filename</name>
35
36
  #[BODY] <link href="$directory/$filename"/>
36
37
  #[BODY] <sym>Scenic Area</sym>
@@ -16,7 +16,7 @@ use vars qw($VERSION);
16
16
  use Image::ExifTool::Exif;
17
17
  use Image::ExifTool::PLIST;
18
18
 
19
- $VERSION = '1.11';
19
+ $VERSION = '1.12';
20
20
 
21
21
  sub ConvertPLIST($$);
22
22
 
@@ -128,6 +128,7 @@ sub ConvertPLIST($$);
128
128
  1 => 'ProRAW',
129
129
  2 => 'Portrait',
130
130
  10 => 'Photo',
131
+ 12 => 'Photo (12)', #PH (NC)
131
132
  },
132
133
  },
133
134
  0x0015 => { # (ImageGroupIdentifier, ref 2)
@@ -154,12 +155,17 @@ sub ConvertPLIST($$);
154
155
  },
155
156
  # 0x001b - (PhotosRenderEffect, ref 2)
156
157
  # 0x001c - (BracketedCaptureSequenceNumber, ref 2)
158
+ # 0x001c - Flash, 2="On" (ref PH)
157
159
  0x001d => { #2
158
160
  Name => 'LuminanceNoiseAmplitude',
159
161
  Writable => 'rational64s',
160
162
  },
161
163
  # 0x001e - (OriginatingAppID, ref 2)
162
- # 0x001f - int32s: 0,1 (PhotosAppFeatureFlags, ref 2)
164
+ 0x001f => {
165
+ Name => 'PhotosAppFeatureFlags', #2
166
+ Notes => 'set if person or pet detected in image', #PH
167
+ Writable => 'int32s',
168
+ },
163
169
  0x0020 => { # (ImageCaptureRequestIdentifier, ref 2)
164
170
  Name => 'ImageCaptureRequestID',
165
171
  Writable => 'string',
@@ -170,6 +176,17 @@ sub ConvertPLIST($$);
170
176
  Writable => 'rational64s',
171
177
  },
172
178
  # 0x0022 - (ARKitPhoto, ref 2)
179
+ 0x0023 => {
180
+ Name => 'AFPerformance', #2
181
+ Writable => 'int32s',
182
+ Count => 2,
183
+ Notes => q{
184
+ first number maybe related to focus distance, last number maybe related to
185
+ focus accuracy
186
+ },
187
+ PrintConv => 'my @a=split " ",$val; sprintf("%d %d %d",$a[0],$a[1]>>28,$a[1]&0xfffffff)',
188
+ PrintConvInv => 'my @a=split " ",$val; sprintf("%d %d",$a[0],($a[1]<<28)+$a[2])',
189
+ },
173
190
  # 0x0023 - int32s[2] (AFPerformance, ref 2)
174
191
  # 0x0024 - (AFExternalOffset, ref 2)
175
192
  0x0025 => { # (StillImageSceneFlags, ref 2)
@@ -196,7 +213,21 @@ sub ConvertPLIST($$);
196
213
  },
197
214
  # 0x002C - (SpatialOverCaptureImageType, ref 2)
198
215
  # 0x002D - (CCT, ref 2)
216
+ 0x002d => { #PH
217
+ Name => 'ColorTemperature',
218
+ Writable => 'int32s',
219
+ },
199
220
  # 0x002E - (ApsMode, ref 2)
221
+ 0x002e => { #PH
222
+ Name => 'CameraType',
223
+ Writable => 'int32s',
224
+ PrintConv => {
225
+ 0 => 'Back Wide Angle',
226
+ 1 => 'Back Normal',
227
+ 6 => 'Front',
228
+ },
229
+ },
230
+ # 0x002e - set to 0 for 0.5x (crop?) (ref PH)
200
231
  0x002F => { #2
201
232
  Name => 'FocusPosition',
202
233
  Writable => 'int32s',
@@ -209,7 +240,9 @@ sub ConvertPLIST($$);
209
240
  # 0x0032 - (IntelligentDistortionCorrection, ref 2)
210
241
  # 0x0033 - (NRFStatus, ref 2)
211
242
  # 0x0034 - (NRFInputBracketCount, ref 2)
243
+ # 0x0034 - 1 for flash on, otherwise doesn't exist (ref PH)
212
244
  # 0x0035 - (NRFRegisteredBracketCount, ref 2)
245
+ # 0x0035 - 0 for flash on, otherwise doesn't exist (ref PH)
213
246
  # 0x0036 - (LuxLevel, ref 2)
214
247
  # 0x0037 - (LastFocusingMethod, ref 2)
215
248
  0x0038 => { # (TimeOfFlightAssistedAutoFocusEstimatorMeasuredDepth, ref 2)
@@ -219,8 +252,10 @@ sub ConvertPLIST($$);
219
252
  },
220
253
  # 0x0039 - (TimeOfFlightAssistedAutoFocusEstimatorROIType, ref 2)
221
254
  # 0x003A - (NRFSRLStatus, ref 2)
255
+ # 0x003a - non-zero if a person was in the image? (ref PH)
222
256
  # 0x003B - (SystemPressureLevel, ref 2)
223
257
  # 0x003C - (CameraControlsStatisticsMaster, ref 2)
258
+ # 0x003c - 4=rear cam, 1=front cam? (ref PH)
224
259
  0x003D => { # (TimeOfFlightAssistedAutoFocusEstimatorSensorConfidence, ref 2)
225
260
  Name => 'AFConfidence',
226
261
  Writable => 'int32s',
@@ -237,6 +272,7 @@ sub ConvertPLIST($$);
237
272
  },
238
273
  0x0040 => { #2
239
274
  Name => 'SemanticStyle',
275
+ Notes => '_1=Tone, _2=Warm, _3=1.Std,2.Vibrant,3.Rich Contrast,4.Warm,5.Cool', #PH
240
276
  ValueConv => \&ConvertPLIST,
241
277
  },
242
278
  0x0041 => { # (SemanticStyleKey_RenderingVersion, ref 2)
@@ -249,20 +285,28 @@ sub ConvertPLIST($$);
249
285
  },
250
286
  # 0x0043 - (SemanticStyleKey_ToneBias, ref 2)
251
287
  # 0x0044 - (SemanticStyleKey_WarmthBias, ref 2)
252
- 0x0045 => { # (FrontFacing, ref 2)
253
- Name => 'FrontFacingCamera',
254
- Writable => 'int32s',
255
- PrintConv => { 0 => 'No', 1 => 'Yes' }, #PH (NC)
256
- },
288
+ # 0x0045 - (FrontFacing, ref 2) (not for iPhone15, ref PH)
257
289
  # 0x0046 - (TimeOfFlightAssistedAutoFocusEstimatorContainsBlindSpot, ref 2)
258
290
  # 0x0047 - (LeaderFollowerAutoFocusLeaderDepth, ref 2)
259
291
  # 0x0048 - (LeaderFollowerAutoFocusLeaderFocusMethod, ref 2)
260
292
  # 0x0049 - (LeaderFollowerAutoFocusLeaderConfidence, ref 2)
261
293
  # 0x004A - (LeaderFollowerAutoFocusLeaderROIType, ref 2)
294
+ # 0x004a - 2=back normal, 4=back wide angle, 5=front (ref PH)
262
295
  # 0x004B - (ZeroShutterLagFailureReason, ref 2)
263
296
  # 0x004C - (TimeOfFlightAssistedAutoFocusEstimatorMSPMeasuredDepth, ref 2)
264
297
  # 0x004D - (TimeOfFlightAssistedAutoFocusEstimatorMSPSensorConfidence, ref 2)
265
298
  # 0x004E - (Camera, ref 2)
299
+ 0x004e => {
300
+ Name => 'Apple_0x004e',
301
+ Unknown => 1,
302
+ # first number is 0 for front cam, 1 for either back cam (ref PH)
303
+ ValueConv => \&ConvertPLIST,
304
+ },
305
+ 0x004f => {
306
+ Name => 'Apple_0x004f',
307
+ Unknown => 1,
308
+ ValueConv => \&ConvertPLIST,
309
+ }
266
310
  );
267
311
 
268
312
  # PLIST-format CMTime structure (ref PH)
@@ -35,7 +35,7 @@ use Image::ExifTool::Sony;
35
35
  use Image::ExifTool::Validate;
36
36
  use Image::ExifTool::MacOS;
37
37
 
38
- $VERSION = '3.55';
38
+ $VERSION = '3.56';
39
39
  @ISA = qw(Exporter);
40
40
 
41
41
  sub NumbersFirst($$);
@@ -672,7 +672,10 @@ Camero.
672
672
 
673
673
  Use the API L<PrintCSV|../ExifTool.html#PrintCSV> option to output all timed
674
674
  PDR data in CSV format at greatly increased speed and with much lower memory
675
- usage.
675
+ usage. This option prints the numerical values for each channel in CSV
676
+ format, suitable for import into RaceRender. In this output, the gear
677
+ numbers for Neutral and Reverse are changed to -1 and -100 respectively for
678
+ compatibility with RaceRender.
676
679
  },
677
680
  PodTrailer => q{
678
681
  ~head1 NOTES
@@ -23,7 +23,7 @@ use vars qw($VERSION);
23
23
  use Image::ExifTool qw(:DataAccess :Utils);
24
24
  use Image::ExifTool::Canon;
25
25
 
26
- $VERSION = '1.39';
26
+ $VERSION = '1.41';
27
27
 
28
28
  sub ProcessCanonVRD($$;$);
29
29
  sub WriteCanonVRD($$;$);
@@ -1020,6 +1020,18 @@ my $blankFooter = "CANON OPTIONAL DATA\0" . ("\0" x 42) . "\xff\xd9";
1020
1020
  # 0x10018 - fmt=8: 0
1021
1021
  # 0x10020 - fmt=2: ''
1022
1022
  0x10021 => 'CustomPictureStyle', # (string)
1023
+ 0x10100 => { #forum15965
1024
+ Name => 'Rating',
1025
+ PrintConv => {
1026
+ 0 => 'Unrated',
1027
+ 1 => 1,
1028
+ 2 => 2,
1029
+ 3 => 3,
1030
+ 4 => 4,
1031
+ 5 => 5,
1032
+ 4294967295 => 'Rejected',
1033
+ },
1034
+ },
1023
1035
  0x10101 => {
1024
1036
  Name => 'CheckMark',
1025
1037
  PrintConv => {
@@ -1427,15 +1439,16 @@ my $blankFooter = "CANON OPTIONAL DATA\0" . ("\0" x 42) . "\xff\xd9";
1427
1439
  4 => 'CropY',
1428
1440
  5 => 'CropWidth',
1429
1441
  6 => 'CropHeight',
1442
+ 7 => 'CropRotation',
1430
1443
  8 => {
1431
- Name => 'CropRotation',
1444
+ Name => 'CropAngle',
1432
1445
  Format => 'double',
1433
1446
  PrintConv => 'sprintf("%.7g",$val)',
1434
1447
  PrintConvInv => '$val',
1435
1448
  },
1436
- 0x0a => 'CropOriginalWidth',
1437
- 0x0b => 'CropOriginalHeight',
1438
- # 0x0c double - value: 100
1449
+ 10 => 'CropOriginalWidth',
1450
+ 11 => 'CropOriginalHeight',
1451
+ # 12 double - value: 100
1439
1452
  );
1440
1453
 
1441
1454
  # DR4 Stamp Tool tags (ref PH)
@@ -19,6 +19,7 @@ use Image::ExifTool::GPS;
19
19
  $VERSION = '1.09';
20
20
 
21
21
  sub ProcessDJIInfo($$$);
22
+ sub Process_djmd($$$);
22
23
 
23
24
  my %convFloat2 = (
24
25
  PrintConv => 'sprintf("%+.2f", $val)',
@@ -186,6 +187,34 @@ my %convFloat2 = (
186
187
  },
187
188
  );
188
189
 
190
+ # TODO - eventually add ability to decode this?
191
+ %Image::ExifTool::DJI::djmd = (
192
+ PROCESS_PROC => \&Process_djmd,
193
+ );
194
+
195
+ #------------------------------------------------------------------------------
196
+ # Process DJI djmd timed data from Action4 videos (ref PH)
197
+ # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
198
+ # Returns: 1 on success
199
+ # TODO: work in progress
200
+ sub Process_djmd($$$)
201
+ {
202
+ my ($et, $dirInfo, $tagTbl) = @_;
203
+ my $dataPt = $$dirInfo{DataPt};
204
+ my ($pos, $bit, $val) = (6, 0, 0);
205
+ for (;;) {
206
+ my $v = Get8u($dataPt, $pos);
207
+ $val += ($v & 0x7f) << $bit;
208
+ last unless $v & 0x80;
209
+ ++$pos;
210
+ $bit += 7;
211
+ }
212
+ $pos += 49;
213
+ my @a = unpack("x${pos}fxfxfxfx3fxfxf", $$dataPt);
214
+ print "$val @a\n";
215
+ return 1;
216
+ }
217
+
189
218
  #------------------------------------------------------------------------------
190
219
  # Process DJI info (ref PH)
191
220
  # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
@@ -57,7 +57,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
57
57
  use Image::ExifTool qw(:DataAccess :Utils);
58
58
  use Image::ExifTool::MakerNotes;
59
59
 
60
- $VERSION = '4.51';
60
+ $VERSION = '4.52';
61
61
 
62
62
  sub ProcessExif($$$);
63
63
  sub WriteExif($$$);
@@ -4342,7 +4342,7 @@ my %opcodeInfo = (
4342
4342
  Count => -1,
4343
4343
  Protected => 1,
4344
4344
  },
4345
- 0xcd3b => { # DNG 1.6
4345
+ 0xcd3f => { # DNG 1.6
4346
4346
  Name => 'RGBTables',
4347
4347
  Writable => 'undef',
4348
4348
  WriteGroup => 'IFD0',
@@ -4404,6 +4404,23 @@ my %opcodeInfo = (
4404
4404
  WriteGroup => 'IFD0',
4405
4405
  Protected => 1,
4406
4406
  },
4407
+ 0xcd49 => { # DNG 1.7.1
4408
+ Name => 'JXLDistance',
4409
+ Writable => 'float',
4410
+ WriteGroup => 'IFD0',
4411
+ },
4412
+ 0xcd4a => { # DNG 1.7.1
4413
+ Name => 'JXLEffort',
4414
+ Notes => 'values range from 1=low to 9=high',
4415
+ Writable => 'int32u',
4416
+ WriteGroup => 'IFD0',
4417
+ },
4418
+ 0xcd4b => { # DNG 1.7.1
4419
+ Name => 'JXLDecodeSpeed',
4420
+ Notes => 'values range from 1=slow to 4=fast',
4421
+ Writable => 'int32u',
4422
+ WriteGroup => 'IFD0',
4423
+ },
4407
4424
  0xea1c => { #13
4408
4425
  Name => 'Padding',
4409
4426
  Binary => 1,
@@ -15,7 +15,7 @@ use vars qw($VERSION);
15
15
  use Image::ExifTool qw(:DataAccess :Utils);
16
16
  use Image::ExifTool::GPS;
17
17
 
18
- $VERSION = '1.00';
18
+ $VERSION = '1.01';
19
19
 
20
20
  sub Process_marl($$$);
21
21
  sub Process_mrld($$$);
@@ -30,6 +30,8 @@ my %convertUnits = (
30
30
  ltr => 'L',
31
31
  );
32
32
 
33
+ my $pi = 3.141592653589793;
34
+
33
35
  # offsets and scaling factors to convert to reasonable units
34
36
  my %changeOffset = (
35
37
  C => -273.15, # K to C
@@ -37,8 +39,8 @@ my %changeOffset = (
37
39
  my %changeScale = (
38
40
  G => 1 / 9.80665, # m/s2 to G
39
41
  kph => 3.6, # m/s to km/h
40
- deg => 180 / 3.1415926536, # radians to degrees
41
- 'deg/sec' => 180 / 3.1415926536, # rad/s to deg/s
42
+ deg => 180 / $pi, # radians to degrees
43
+ 'deg/sec' => 180 / $pi, # rad/s to deg/s
42
44
  '%' => 100, # decimal to %
43
45
  kPa => 1/1000, # Pa to kPa
44
46
  rpm => 10, # ? (arbitrary factor of 10)
@@ -181,7 +183,7 @@ my %channelStruct = (
181
183
  Name => 'GPSTrack',
182
184
  Description => 'GPS Track',
183
185
  Groups => { 2 => 'Location' },
184
- PrintConv => 'sprintf("%.2f",$val)',
186
+ PrintConv => '$val > 360 ? "n/a" : sprintf("%.2f",$val)', # (seen 655.35)
185
187
  },
186
188
  ABSActive => { },
187
189
  AccelPos => { },
@@ -209,7 +211,14 @@ my %channelStruct = (
209
211
  EngineTorqureReq => { },
210
212
  FuelCapacity => { },
211
213
  FuelLevel => { },
212
- Gear => { ValueConv => { 1=>1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6, 13=>'N', 14=>'R' } },
214
+ Gear => {
215
+ Notes => q{
216
+ in the PrintCSV output, the value for Neutral is set to -1, and Reverse to
217
+ -100 for compatibility with RaceRender
218
+ },
219
+ CSVConv => { 13 => -1, 14 => -100 },
220
+ PrintConv => { 1=>1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6, 13=>'N', 14=>'R' }
221
+ },
213
222
  GPSFix => { },
214
223
  InfotainOpMode => { },
215
224
  IntakeAirTemperature => { },
@@ -261,7 +270,7 @@ my %channelStruct = (
261
270
  sub PrintCSV($;$)
262
271
  {
263
272
  my ($et, $ts) = @_;
264
- my $csv = $$et{GMCsv} or return;
273
+ my $csv = $$et{GMCsv} or return; # get the list of channels with measurements
265
274
  @$csv or return;
266
275
  my $vals = $$et{GMVals};
267
276
  my $gmDict = $$et{GMDictionary};
@@ -271,7 +280,7 @@ sub PrintCSV($;$)
271
280
  foreach (@$csv) {
272
281
  my $gmChan = $$gmDict[$_];
273
282
  $items[$_] = $$vals[$_] * $$gmChan{Mult} + $$gmChan{Off};
274
- # apply lookup conversion if applicable (ie. Gear)
283
+ # apply CSV conversion if applicable (ie. Gear)
275
284
  next unless $$gmChan{Conv} and defined $$gmChan{Conv}{$items[$_]};
276
285
  $items[$_] = $$gmChan{Conv}{$items[$_]};
277
286
  }
@@ -397,7 +406,7 @@ sub Process_mrld($$$)
397
406
  my $init = int(($a[6] + $a[7]) / 2); # initial value for difference readings
398
407
  # save information about this channel necessary for processing the marl data
399
408
  $$gmDict[$chan] = { Name => $name, Mult => $mult, Off => $off, Init => $init };
400
- $$gmDict[$chan]{Conv} = $$tagInfo{ValueConv} if ref $$tagInfo{ValueConv} eq 'HASH';
409
+ $$gmDict[$chan]{Conv} = $$tagInfo{CSVConv};
401
410
  $csv and $$csv[$chan] = $a[12] . ($a[3] ? " ($a[3])" : '');
402
411
  }
403
412
  # channel 0 must not be defined because we use it for the TimeStamp