exiftool-vendored 15.12.1 → 16.0.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.
package/CHANGELOG.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Providing the flexibility to reversion the API or UPDATE version slots as
6
6
  features or bugfixes arise and using ExifTool's version number is at odds with
7
- eachother, so this library follows [Semver](https://semver.org/), and the
7
+ each other, so this library follows [Semver](https://semver.org/), and the
8
8
  vendored versions of ExifTool match the version they vendor.
9
9
 
10
10
  ### The `MAJOR` or `API` version is incremented for
@@ -25,6 +25,67 @@ vendored versions of ExifTool match the version they vendor.
25
25
 
26
26
  ## Version history
27
27
 
28
+ ### v16.0.0
29
+
30
+ - 💔/🐞 Timezone extraction has been adjusted: if there is a GPS location, we'll
31
+ prefer that `tzlookup` as the authoritative timezone offset. If there isn't
32
+ GPS lat/lon, we'll use `Timezone`, `OffsetTime`, or `TimeZoneOffset`. If those
33
+ are missing, we'll infer the offset from UTC offsets.
34
+
35
+ Prior builds would defer to the offset in `Timezone`, `OffsetTime`, or
36
+ `TimeZoneOffset`, but GPS is more reliable, and results in a proper time zone
37
+ (like `America/Los_Angeles`). Zone names work correctly even when times are
38
+ adjusted across daylight savings offset boundaries.
39
+
40
+ - 💔/🐞 Timezone application is now has been improved: if a timezone can be
41
+ extracted for a given file, `readTags` will now make all `ExifDateTime`
42
+ entries match that timezone. The timestamps should refer to the same
43
+ timestamp/seconds-from-common-epoch, but "local time" may be different as
44
+ we've adjusted the timezone accordingly.
45
+
46
+ Metadata sometimes includes a timezone offset, and sometimes it doesn't, and
47
+ it's all pretty inconsistent, but worse, prior versions would sometimes
48
+ inherit the current system timezone for an arbitrary subset of tags. This
49
+ version should remove the system timezone "leaking" into your metadata values.
50
+
51
+ As an example, if you took a photo with GPS information from Rome (CET,
52
+ UTC+1), and your computer is in California with `TZ=America/Los_Angeles`,
53
+ prior versions could return `CreateDate: 2022-02-02 02:02:22-07:00`. This
54
+ version will translate that time into `CreateDate: 2022-02-02 11:02:22+01:00`.
55
+
56
+ Note that this fix results in `readTags` rendering different `ExifDateTime`
57
+ values from prior versions, so I bumped the major version to highlight this
58
+ change.
59
+
60
+ - 💔 `Tags` is automatically generated by `mktags`, which now has a set of
61
+ "required" tags with type and group metadata to ensure a core set of tags
62
+ don't disappear or change types.
63
+
64
+ As a reminder, the `Tags` interface is only a subset of fields returned, due
65
+ to TypeScript limitations. `readTags` still returns all values that ExifTool
66
+ provides.
67
+
68
+ - 🐞 Fixed a bunch of broken API links in the README due to `typedoc` changing
69
+ URLs. Harumph.
70
+
71
+ - 🐞 Prior versions of `ExifDateTime.parseISO` would accept just time or date
72
+ strings.
73
+
74
+ - 🐞/📦 `TimeStamp` tags may now be properly parsed as `ExifDateTime`.
75
+
76
+ - 📦 Added performance section to the README.
77
+
78
+ - 📦 Timezone offset formatting changed slightly: the hour offset is no longer
79
+ zero-padded, which better matches the Luxon implementation we use internally.
80
+
81
+ - 📦 `ExifDateTime` caches the result of `toDateTime` now, which may save a
82
+ couple extra objects fed to the GC.
83
+
84
+ - 📦 Updated dependencies, including batch-cluster
85
+ [v10.3.2](https://github.com/photostructure/batch-cluster.js/blob/main/CHANGELOG.md#v1032)),
86
+ which fixed several race conditions and added several process performance
87
+ improvements including support for zero-wait multi-process launches.
88
+
28
89
  ### v15.12.1
29
90
 
30
91
  - 📦 Updated dependencies (batch-cluster
package/README.md CHANGED
@@ -21,19 +21,16 @@
21
21
 
22
22
  1. Support for
23
23
 
24
- - [reading tags](https://photostructure.github.io/exiftool-vendored.js/classes/exiftool.html#read)
25
- - extracting embedded binaries, like [thumbnail](https://photostructure.github.io/exiftool-vendored.js/classes/exiftool.html#extractthumbnail) and [preview](https://photostructure.github.io/exiftool-vendored.js/classes/exiftool.html#extractpreview) images
26
- - [writing tags](https://photostructure.github.io/exiftool-vendored.js/classes/exiftool.html#write)
27
- - [rescuing metadata](https://photostructure.github.io/exiftool-vendored.js/classes/exiftool.html#rewritealltags)
24
+ - [reading tags](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#read)
25
+ - extracting embedded binaries, like [thumbnail](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#extractThumbnail) and [preview](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#extractPreview) images
26
+ - [writing tags](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#write)
27
+ - [rescuing metadata](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#rewriteAllTags)
28
28
 
29
29
  1. **[Robust type definitions](#tags)** of the top 99.5% tags used by over 6,000
30
- different camera makes and models (see an [example](interfaces/exiftags.html))
31
-
32
- 1. **Auditable ExifTool source code** (the vendored code is
33
- [checksum verified](http://owl.phy.queensu.ca/~phil/exiftool/checksums.txt))
30
+ different camera makes and models (see an [example](https://photostructure.github.io/exiftool-vendored.js/interfaces/EXIFTags.html))
34
31
 
35
32
  1. **Automated updates** to ExifTool ([as new versions come out
36
- monthly](http://www.sno.phy.queensu.ca/~phil/exiftool/history.html))
33
+ monthly](https://exiftool.org/history.html))
37
34
 
38
35
  1. **Robust test coverage**, performed with on [macOS, Linux, and
39
36
  Windows](https://github.com/photostructure/exiftool-vendored.js/actions?query=workflow%3A%22Node.js+CI%22)
@@ -59,7 +56,7 @@ If you're installing on a minimal Linux distribution, like
59
56
  ## Upgrading
60
57
 
61
58
  See the
62
- [CHANGELOG](https://github.com/mceachen/exiftool-vendored.js/blob/main/CHANGELOG.md)
59
+ [CHANGELOG](https://github.com/photostructure/exiftool-vendored.js/blob/main/CHANGELOG.md)
63
60
  for breaking changes since you last updated.
64
61
 
65
62
  ### Major version bumps
@@ -96,7 +93,7 @@ exiftool
96
93
  ```
97
94
 
98
95
  If the default [ExifTool constructor
99
- parameters](https://photostructure.github.io/exiftool-vendored.js/interfaces/exiftooloptions.html)
96
+ parameters](https://photostructure.github.io/exiftool-vendored.js/interfaces/ExifToolOptions.html)
100
97
  wont' work for you, it's just a class that takes an options hash:
101
98
 
102
99
  ```js
@@ -110,7 +107,7 @@ Remember to `.end()` whichever singleton you use.
110
107
 
111
108
  ### General API
112
109
 
113
- `ExifTool.read()` returns a Promise to a [Tags](https://photostructure.github.io/exiftool-vendored.js/interfaces/tags.html) instance. Note
110
+ `ExifTool.read()` returns a Promise to a [Tags](https://photostructure.github.io/exiftool-vendored.js/interfaces/Tags.html) instance. Note
114
111
  that errors may be returned either by rejecting the promise, or for less
115
112
  severe problems, via the `errors` field.
116
113
 
@@ -123,9 +120,9 @@ ExifTool knows how to extract _several thousand_ different tag fields.
123
120
 
124
121
  Unfortunately, TypeScript crashes with `error TS2590: Expression produces a union type that is too complex to represent` if the `Tags` interface was comprehensive.
125
122
 
126
- Instead, we build a corpus of "commonly seen" tags from over 5,000 different
123
+ Instead, we build a corpus of "commonly seen" tags from over 10,000 different
127
124
  digital camera makes and models, many from the [ExifTool metadata
128
- repository](https://exiftool.org/sample_images.html).
125
+ repository](https://exiftool.org/sample_images.html) and <raw.pixls.us>.
129
126
 
130
127
  Here are some example fields:
131
128
 
@@ -156,7 +153,7 @@ Nikon, Canon, Sony, and Apple devices).
156
153
  Just because a field is missing from the Tags interface **does not mean the
157
154
  field doesn't exist in the returned object**. This library doesn't exclude
158
155
  unknown fields, in other words. It's up to you and your code to look for other
159
- fields you expect, and cast to a more relevant interface.
156
+ fields you expect and cast to a more relevant interface.
160
157
 
161
158
  ### Errors and Warnings
162
159
 
@@ -170,19 +167,14 @@ warnings that don't reject the underlying task, you can provide either a
170
167
  [`minorErrorsRegExp`](interfaces/exiftooloptions.html#minorerrorsregexp), or an
171
168
  implementation of
172
169
  [`rejectTaskOnStderr`](interfaces/exiftooloptions.html#rejecttaskonstderr).
173
- Either of these parameters are provided to the `ExifTool` constructor.
170
+ Either of these parameters is provided to the `ExifTool` constructor.
174
171
 
175
172
  ### Logging and events
176
173
 
177
174
  To enable trace, debug, info, warning, or error logging from this library and
178
- the underlying `batch-cluster` library,
179
- use[`setLogger`](globals.html#setlogger). Example
180
- code can be found
181
- [here](https://github.com/photostructure/batch-cluster.js/blob/main/src/_chai.spec.ts#L20).
175
+ the underlying `batch-cluster` library, provide a [Logger](https://photostructure.github.io/batch-cluster.js/interfaces/Logger.html) instance to the `ExifTool` constructor options.
182
176
 
183
- ExifTool instances emits events for "startError", "taskError", "endError",
184
- "beforeEnd", and "end" that you can register listeners for, using
185
- [on](https://batch-cluster.js.org/classes/batchcluster.html#on).
177
+ ExifTool instances emits [many lifecycle and error events](https://photostructure.github.io/batch-cluster.js/interfaces/BatchClusterEvents.html#beforeEnd) via `batch-cluster`.
186
178
 
187
179
  ### Reading tags
188
180
 
@@ -229,14 +221,14 @@ exiftool.extractBinaryTag("tagname", "path/to/file.exf", "path/to/dest.bin")
229
221
 
230
222
  ### Writing tags
231
223
 
232
- Note that only a portion of tags are writable. Refer to [the
233
- documentation](https://sno.phy.queensu.ca/~phil/exiftool/TagNames/index.html)
224
+ Note that only a portion of tags is writable. Refer to [the
225
+ documentation](https://exiftool.org/TagNames/index.html)
234
226
  and look under the "Writable" column.
235
227
 
236
228
  If you apply malformed values or ask to write to tags that aren't
237
229
  supported, the returned `Promise` will be rejected.
238
230
 
239
- Only string and numeric primitive are supported as values to the object.
231
+ Only string and numeric primitives are supported as values to the object.
240
232
 
241
233
  To write a comment to the given file so it shows up in the Windows Explorer
242
234
  Properties panel:
@@ -246,7 +238,7 @@ exiftool.write("path/to/file.jpg", { XPComment: "this is a test comment" })
246
238
  ```
247
239
 
248
240
  To change the DateTimeOriginal, CreateDate and ModifyDate tags (using the
249
- [AllDates](https://sno.phy.queensu.ca/~phil/exiftool/TagNames/Shortcuts.html)
241
+ [AllDates](https://exiftool.org/TagNames/Shortcuts.html)
250
242
  shortcut) to 4:56pm UTC on February 6, 2016:
251
243
 
252
244
  ```js
@@ -268,7 +260,7 @@ To delete a tag, use `null` as the value.
268
260
  exiftool.write("path/to/file.jpg", { UserComment: null })
269
261
  ```
270
262
 
271
- The above example removes any value associated to the `UserComment` tag.
263
+ The above example removes any value associated with the `UserComment` tag.
272
264
 
273
265
  ### Always Beware: Timezones
274
266
 
@@ -282,11 +274,11 @@ section about [Dates](#dates) below for more information.
282
274
 
283
275
  ### Rewriting tags
284
276
 
285
- You may find that some of your images have corrupt metadata, and that writing
277
+ You may find that some of your images have corrupt metadata and that writing
286
278
  new dates, or editing the rotation information, for example, fails. ExifTool can
287
279
  try to repair these images by rewriting all the metadata into a new file, along
288
280
  with the original image content. See the
289
- [documentation](http://owl.phy.queensu.ca/~phil/exiftool/faq.html#Q20) for more
281
+ [documentation](https://exiftool.org/faq.html#Q20) for more
290
282
  details about this functionality.
291
283
 
292
284
  `rewriteAllTags` returns a void Promise that will be rejected if there are any
@@ -301,10 +293,10 @@ exiftool.rewriteAllTags("problematic.jpg", "rewritten.jpg")
301
293
  ExifTool has an [extensive user configuration system](http://owl.phy.queensu.ca/~phil/exiftool/config.html). There are several ways to use one:
302
294
 
303
295
  1. Place your [user configuration
304
- file](http://owl.phy.queensu.ca/~phil/exiftool/config.html) in your `HOME`
296
+ file](https://exiftool.org/config.html) in your `HOME`
305
297
  directory
306
298
  1. Set the `EXIFTOOL_HOME` environment variable to the fully-qualified path that
307
- contains your user config.
299
+ contains your user configuration.
308
300
  1. Specify the in the ExifTool constructor options:
309
301
 
310
302
  ```js
@@ -316,7 +308,7 @@ new ExifTool({ exiftoolEnv: { EXIFTOOL_HOME: resolve("path", "to", "config", "di
316
308
  The default `BatchClusterOptions.cleanupChildProcs` value of `true` means that BatchCluster, which is used to manage child `exiftool` processes, will try to use `ps` to ensure Node's view of process state are correct, and that errant
317
309
  processes are cleaned up.
318
310
 
319
- If you run this in a docker image based off Alpine or Debian Slim, **this won't work properly unless you install the `procps` package.**
311
+ If you run this in a docker image based on Alpine or Debian Slim, **this won't work properly unless you install the `procps` package.**
320
312
 
321
313
  [See `batch-cluster` for details.](https://github.com/photostructure/batch-cluster.js/issues/13)
322
314
 
@@ -329,7 +321,7 @@ exiting due to the way Node.js streams
329
321
  work](https://github.com/photostructure/exiftool-vendored.js/issues/106).
330
322
 
331
323
  You must explicitly call `.end()` on any used instance of `ExifTool` for `node`
332
- to exit gracefully.
324
+ to exit gracefully.
333
325
 
334
326
  This call cannot be in a `process.on("exit")` hook, as the `stdio` streams
335
327
  attached to the child process cannot be `unref`'ed. (If there's a solution to
@@ -356,9 +348,9 @@ Images and videos rarely specify a time zone in their dates. If all your files
356
348
  were captured in your current time zone, defaulting to the local time zone is a
357
349
  safe assumption, but if you have files that were captured in different parts of
358
350
  the world, **this assumption will not be correct**. Parsing the same file in
359
- different parts of the world results in a different times for the same file.
351
+ different parts of the world result in different times for the same file.
360
352
 
361
- Prior to version 7, heuristic 1 and 3 was applied.
353
+ Prior to version 7, heuristic 1 and 3 were applied.
362
354
 
363
355
  As of version 7.0.0, `exiftool-vendored` uses the following heuristics. The
364
356
  highest-priority heuristic to return a value will be used as the timezone offset
@@ -366,7 +358,7 @@ for all datetime tags that don't already have a specified timezone.
366
358
 
367
359
  ### Heuristic 1: explicit metadata
368
360
 
369
- If the [EXIF](https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html)
361
+ If the [EXIF](https://exiftool.org/TagNames/EXIF.html)
370
362
  `TimeZoneOffset` tag is present it will be applied as per the spec to
371
363
  `DateTimeOriginal`, and if there are two values, the `ModifyDate` tag as well.
372
364
  `OffsetTime`, `OffsetTimeOriginal`, and `OffsetTimeDigitized` are also
@@ -386,14 +378,14 @@ Deltas of > 14 hours are considered invalid.
386
378
 
387
379
  ### ExifDate and ExifDateTime
388
380
 
389
- Because datetimes have this optionally-set timezone, and some tags only specify
381
+ Because date-times have this optionally-set timezone, and some tags only specify
390
382
  the date, this library returns classes that encode the date, the time of day, or
391
383
  both, **with an optional timezone and an optional tzoffset**: `ExifDateTime` and
392
384
  `ExifTime`. It's up to you, then, to determine what's correct for your
393
385
  situation.
394
386
 
395
387
  Note also that some smartphones record timestamps with microsecond precision
396
- (not just millis!), and both `ExifDateTime` and `ExifTime` have floating point
388
+ (not just milliseconds!), and both `ExifDateTime` and `ExifTime` have floating point
397
389
  milliseconds.
398
390
 
399
391
  ## Tags
@@ -410,12 +402,12 @@ camera make and model images, in large part sourced from the ExifTool site.
410
402
  that your IDE can autocomplete.
411
403
 
412
404
  Tags marked with "★★★★", like
413
- [MIMEType](https://photostructure.github.io/exiftool-vendored.js/interfaces/tags.html#mimetype),
405
+ [MIMEType](https://photostructure.github.io/exiftool-vendored.js/interfaces/FileTags.html#MIMEType),
414
406
  should be found in most files. Of the several thousand metadata tags, realize
415
- less than 50 are found generally. You'll need to do your own research to
407
+ less than 50 are found generally. You'll need to do your research to
416
408
  determine which tags are valid for your uses.
417
409
 
418
- Note that if parsing fails (for, example, a datetime string), the raw string
410
+ Note that if parsing fails (for, example, a date-time string), the raw string
419
411
  will be returned. Consuming code should verify both existence and type as
420
412
  reasonable for safety.
421
413
 
@@ -439,28 +431,32 @@ const tags2: Tags = parseJSON(str) as Tags
439
431
 
440
432
  ## Performance
441
433
 
442
- The `npm run mktags` target reads all tags found in a batch of sample images and
443
- parses the results.
434
+ The default [exiftool]() singleton is intentionally throttled. If full system
435
+ utilization is acceptable:
444
436
 
445
- Using `exiftool-vendored`:
437
+ 1. set
438
+ [`maxProcs`](https://photostructure.github.io/batch-cluster.js/classes/BatchClusterOptions.html#maxProcs)
439
+ higher
446
440
 
447
- ```sh
448
- Read 2236 unique tags from 3011 files.
449
- Parsing took 16s (5.4ms / file) # windows 10, core i7, maxProcs 4
450
- Parsing took 27s (9.0ms / file) # ubuntu 18.04, core i3, maxProcs 1
451
- Parsing took 13s (4.2ms / file) # ubuntu 18.04, core i3, maxProcs 4
441
+ 2. consider setting
442
+ [`minDelayBetweenSpawnMillis`](https://photostructure.github.io/batch-cluster.js/classes/BatchClusterOptions.html#minDelayBetweenSpawnMillis)
443
+ to 0
452
444
 
453
- # September 2020 update with > 2x more files and faster CPU:
454
- Read 3100 unique tags from 8028 files.
455
- Parsing took 16s (2.0ms / file) # ubuntu 20.04, AMD Ryzen 9 3900X, maxProcs 24
456
- ```
445
+ 3. On a performant linux box, a smaller value of `streamFlushMillis` may work as
446
+ well: if you see [`noTaskData`
447
+ events](https://photostructure.github.io/batch-cluster.js/interfaces/BatchClusterEvents.html#noTaskData),
448
+ you need to bump the value up.
457
449
 
458
- Using the `exiftool` npm package takes 7-10x longer, and doesn't work on Windows.
450
+ ## Benchmarking
459
451
 
460
- ```sh
461
- Reading 3011 files...
462
- Parsing took 86s (28.4ms / file) # ubuntu, core i3
463
- ```
452
+ The `yarn mktags ../path/to/examples` target reads all tags found in a directory
453
+ hierarchy of sample images and videos, and parses the results.
454
+
455
+ `exiftool-vendored` v16.0.0 on a 2019 AMD Ryzen 3900X running Ubuntu 20.04 on an
456
+ SSD can process 20+ files per second, per thread, or 500+ files per second
457
+ utilizing all CPU threads.
458
+
459
+ It can read, parse,
464
460
 
465
461
  ### Batch mode
466
462
 
@@ -1,9 +1,10 @@
1
- import { DateTime, ToISOTimeOptions } from "luxon";
1
+ import { DateTime, ToISOTimeOptions, Zone, ZoneOptions } from "luxon";
2
2
  import { Maybe } from "./Maybe";
3
3
  /**
4
4
  * Encodes an ExifDateTime with an optional tz offset in minutes.
5
5
  */
6
6
  export declare class ExifDateTime {
7
+ #private;
7
8
  readonly year: number;
8
9
  readonly month: number;
9
10
  readonly day: number;
@@ -14,7 +15,7 @@ export declare class ExifDateTime {
14
15
  readonly tzoffsetMinutes?: number | undefined;
15
16
  readonly rawValue?: string | undefined;
16
17
  readonly zoneName?: string | undefined;
17
- static fromISO(iso: string, zone?: Maybe<string>, rawValue?: string): Maybe<ExifDateTime>;
18
+ static fromISO(iso: string, zone?: Maybe<string>): Maybe<ExifDateTime>;
18
19
  /**
19
20
  * Try to parse a date-time string from EXIF. If there is not both a date and
20
21
  * a time component, returns `undefined`.
@@ -33,7 +34,9 @@ export declare class ExifDateTime {
33
34
  get millis(): number | undefined;
34
35
  get hasZone(): boolean;
35
36
  get zone(): Maybe<string>;
37
+ setZone(zone?: string | Zone, opts?: ZoneOptions): ExifDateTime;
36
38
  toDateTime(): DateTime;
39
+ toEpochSeconds(): number;
37
40
  toDate(): Date;
38
41
  toISOString(options?: ToISOTimeOptions): Maybe<string>;
39
42
  toExifString(): string;
@@ -1,4 +1,16 @@
1
1
  "use strict";
2
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
5
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
6
+ };
7
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8
+ if (kind === "m") throw new TypeError("Private method is not writable");
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12
+ };
13
+ var _ExifDateTime_dt;
2
14
  Object.defineProperty(exports, "__esModule", { value: true });
3
15
  exports.ExifDateTime = void 0;
4
16
  const luxon_1 = require("luxon");
@@ -21,14 +33,24 @@ class ExifDateTime {
21
33
  this.tzoffsetMinutes = tzoffsetMinutes;
22
34
  this.rawValue = rawValue;
23
35
  this.zoneName = zoneName;
36
+ _ExifDateTime_dt.set(this, void 0);
24
37
  }
25
- static fromISO(iso, zone, rawValue) {
38
+ static fromISO(iso, zone) {
26
39
  if ((0, String_1.blank)(iso) || null != iso.match(/^\d+$/))
27
40
  return undefined;
28
- return this.fromDateTime(luxon_1.DateTime.fromISO(iso, {
29
- setZone: true,
30
- zone: zone !== null && zone !== void 0 ? zone : Timezones_1.UnsetZone,
31
- }), rawValue !== null && rawValue !== void 0 ? rawValue : iso);
41
+ // Unfortunately, DateTime.fromISO() is happy to parse a date with no time,
42
+ // so we have to do this ourselves:
43
+ return this.fromPatterns(iso, [
44
+ // if it specifies a zone, use it:
45
+ { fmt: "y-M-d'T'H:m:s.uZZ" },
46
+ { fmt: "y-M-d'T'H:m:sZZ" },
47
+ // if it specifies UTC, use it:
48
+ { fmt: "y-M-d'T'H:m:s.u'Z'", zone: "utc" },
49
+ { fmt: "y-M-d'T'H:m:s'Z'", zone: "utc" },
50
+ // Otherwise use the default zone:
51
+ { fmt: "y-M-d'T'H:m:s.u", zone },
52
+ { fmt: "y-M-d'T'H:m:s", zone },
53
+ ]);
32
54
  }
33
55
  /**
34
56
  * Try to parse a date-time string from EXIF. If there is not both a date and
@@ -67,9 +89,10 @@ class ExifDateTime {
67
89
  }), (dt) => this.fromDateTime(dt, s))));
68
90
  }
69
91
  static fromExifStrict(text, zone) {
92
+ var _a;
70
93
  if ((0, String_1.blank)(text))
71
94
  return undefined;
72
- return this.fromPatterns(text, [
95
+ return ((_a = this.fromPatterns(text, [
73
96
  // if it specifies a zone, use it:
74
97
  { fmt: "y:M:d H:m:s.uZZ" },
75
98
  { fmt: "y:M:d H:m:sZZ" },
@@ -80,16 +103,7 @@ class ExifDateTime {
80
103
  { fmt: "y:M:d H:m:s.u", zone },
81
104
  { fmt: "y:M:d H:m:s", zone },
82
105
  // Not found yet? Maybe it's in ISO format? See https://github.com/photostructure/exiftool-vendored.js/issues/71
83
- // if it specifies a zone, use it:
84
- { fmt: "y-M-d'T'H:m:s.uZZ" },
85
- { fmt: "y-M-d'T'H:m:sZZ" },
86
- // if it specifies UTC, use it:
87
- { fmt: "y-M-d'T'H:m:s.u'Z'", zone: "utc" },
88
- { fmt: "y-M-d'T'H:m:s'Z'", zone: "utc" },
89
- // Otherwise use the default zone:
90
- { fmt: "y-M-d'T'H:m:s.u", zone },
91
- { fmt: "y-M-d'T'H:m:s", zone },
92
- ]);
106
+ ])) !== null && _a !== void 0 ? _a : this.fromISO(text, zone));
93
107
  }
94
108
  static fromExifLoose(text, defaultZone) {
95
109
  if ((0, String_1.blank)(text))
@@ -127,8 +141,21 @@ class ExifDateTime {
127
141
  var _a;
128
142
  return (_a = this.zoneName) !== null && _a !== void 0 ? _a : (0, Timezones_1.offsetMinutesToZoneName)(this.tzoffsetMinutes);
129
143
  }
144
+ setZone(zone, opts) {
145
+ // This is a bit tricky... We want to keep the local time and just _say_ it was in the zone of the image **if we don't already have a zone.**
146
+ // If we _do_ have a zone, assume it was already converted by ExifTool into (probably the system) timezone, which means _don't_ keepLocalTime.
147
+ const result = ExifDateTime.fromDateTime(this.toDateTime().setZone(zone, {
148
+ keepLocalTime: !this.hasZone,
149
+ ...opts,
150
+ }), this.rawValue);
151
+ // We know this will be defined: this is valid, so changing the zone will
152
+ // also be valid.
153
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
154
+ return result;
155
+ }
130
156
  toDateTime() {
131
- return luxon_1.DateTime.fromObject({
157
+ var _a;
158
+ return (__classPrivateFieldSet(this, _ExifDateTime_dt, (_a = __classPrivateFieldGet(this, _ExifDateTime_dt, "f")) !== null && _a !== void 0 ? _a : luxon_1.DateTime.fromObject({
132
159
  year: this.year,
133
160
  month: this.month,
134
161
  day: this.day,
@@ -138,7 +165,10 @@ class ExifDateTime {
138
165
  millisecond: this.millisecond,
139
166
  }, {
140
167
  zone: this.zone,
141
- });
168
+ }), "f"));
169
+ }
170
+ toEpochSeconds() {
171
+ return this.toDateTime().toUnixInteger();
142
172
  }
143
173
  toDate() {
144
174
  return this.toDateTime().toJSDate();
@@ -179,4 +209,5 @@ class ExifDateTime {
179
209
  }
180
210
  }
181
211
  exports.ExifDateTime = ExifDateTime;
212
+ _ExifDateTime_dt = new WeakMap();
182
213
  //# sourceMappingURL=ExifDateTime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExifDateTime.js","sourceRoot":"","sources":["../src/ExifDateTime.ts"],"names":[],"mappings":";;;AAAA,iCAAwD;AACxD,yC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CAAC,WAAW,EAChB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,QAAQ,CACd,CAAA;IACH,CAAC;CACF;AArQD,oCAqQC"}
@@ -1,19 +1,21 @@
1
1
  /// <reference types="node" />
2
2
  import * as bc from "batch-cluster";
3
+ import { ApplicationRecordTags } from "./ApplicationRecordTags";
3
4
  import { ExifDate } from "./ExifDate";
4
5
  import { ExifDateTime } from "./ExifDateTime";
5
6
  import { ExifToolTask } from "./ExifToolTask";
7
+ import { ICCProfileTags } from "./ICCProfileTags";
6
8
  import { Maybe } from "./Maybe";
7
9
  import { PreviewTag } from "./PreviewTag";
8
10
  import { Struct } from "./Struct";
9
- import { Tags } from "./Tags";
11
+ import { APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, CompositeTags, EXIFTags, ExifToolTags, FileTags, FlashPixTags, IPTCTags, JFIFTags, MakerNotesTags, MetaTags, MPFTags, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, Tags, XMPTags } from "./Tags";
10
12
  export { ExifDate } from "./ExifDate";
11
13
  export { ExifDateTime } from "./ExifDateTime";
12
14
  export { ExifTime } from "./ExifTime";
13
15
  export { ExifToolTask } from "./ExifToolTask";
14
16
  export { parseJSON } from "./JSON";
15
17
  export { offsetMinutesToZoneName, UnsetZone, UnsetZoneName, UnsetZoneOffsetMinutes, } from "./Timezones";
16
- export type { AdditionalWriteTags, ExpandedDateTags, Maybe, Omit, Struct, Tags };
18
+ export type { AdditionalWriteTags, APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, ApplicationRecordTags, CompositeTags, EXIFTags, ExifToolTags, ExpandedDateTags, FileTags, FlashPixTags, ICCProfileTags, IPTCTags, JFIFTags, MakerNotesTags, Maybe, MetaTags, MPFTags, Omit, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, Struct, Tags, XMPTags, };
17
19
  export declare const DefaultExifToolPath: string;
18
20
  export declare const DefaultExiftoolArgs: string[];
19
21
  /**
@@ -30,17 +32,13 @@ export interface ShortcutTags {
30
32
  }
31
33
  declare type AdditionalWriteTags = {
32
34
  "Orientation#"?: number;
33
- /**
34
- * Included because it's so rare, it doesn't always make the Tags build:
35
- */
36
- TimeZoneOffset?: number | string;
37
35
  };
38
36
  declare type ExpandedDateTags = {
39
37
  [K in keyof Tags]: (Tags[K] extends number ? number : Tags[K] extends ExifDateTime ? ExifDate | ExifDateTime : Tags[K]) | string;
40
38
  };
41
- declare type NotUndefined<T> = T extends undefined ? never : T;
39
+ export declare type Defined<T> = T extends undefined ? never : T;
42
40
  export declare type DefinedOrNullValued<T> = {
43
- [P in keyof T]: NotUndefined<T[P]> | null;
41
+ [P in keyof T]: Defined<T[P]> | null;
44
42
  };
45
43
  export declare type WriteTags = DefinedOrNullValued<ShortcutTags & AdditionalWriteTags & ExpandedDateTags>;
46
44
  export declare const DefaultMaxProcs: number;
@@ -322,6 +320,7 @@ export declare class ExifTool {
322
320
  * @return report why child processes were recycled
323
321
  */
324
322
  childEndCounts(): {
323
+ startError: number;
325
324
  broken: number;
326
325
  closed: number;
327
326
  ending: number;
package/dist/ExifTool.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1 +1 @@
1
- {"version":3,"file":"ExifTool.js","sourceRoot":"","sources":["../src/ExifTool.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