exiftool-vendored 26.2.0 → 28.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 +26 -2
- package/README.md +3 -3
- package/RELEASE.md +8 -11
- package/SECURITY.md +1 -1
- package/dist/Array.d.ts +1 -0
- package/dist/Array.js +11 -8
- package/dist/Array.js.map +1 -1
- package/dist/AsyncRetry.js +1 -2
- package/dist/AsyncRetry.js.map +1 -1
- package/dist/BinaryField.js +4 -2
- package/dist/BinaryField.js.map +1 -1
- package/dist/BinaryToBufferTask.d.ts +0 -1
- package/dist/ContainerDirectoryItem.d.ts +13 -0
- package/dist/ContainerDirectoryItem.js +3 -0
- package/dist/ContainerDirectoryItem.js.map +1 -0
- package/dist/DateTime.js +6 -6
- package/dist/DateTime.js.map +1 -1
- package/dist/DefaultExifToolOptions.js +15 -0
- package/dist/DefaultExifToolOptions.js.map +1 -1
- package/dist/ErrorsAndWarnings.js +1 -2
- package/dist/ErrorsAndWarnings.js.map +1 -1
- package/dist/ExifDate.js +1 -1
- package/dist/ExifDate.js.map +1 -1
- package/dist/ExifTool.d.ts +79 -32
- package/dist/ExifTool.js +28 -49
- package/dist/ExifTool.js.map +1 -1
- package/dist/ExifToolOptions.d.ts +17 -5
- package/dist/ExifToolOptions.js +1 -2
- package/dist/ExifToolOptions.js.map +1 -1
- package/dist/ExifToolTags.js +2 -2
- package/dist/ExifToolTags.js.map +1 -1
- package/dist/ExifToolTask.d.ts +0 -1
- package/dist/ExifToolVendoredTags.js +2 -2
- package/dist/ExifToolVendoredTags.js.map +1 -1
- package/dist/ExiftoolPath.js +1 -2
- package/dist/ExiftoolPath.js.map +1 -1
- package/dist/File.js +1 -2
- package/dist/File.js.map +1 -1
- package/dist/FileTags.js +1 -2
- package/dist/FileTags.js.map +1 -1
- package/dist/FirstDateTime.js +1 -2
- package/dist/FirstDateTime.js.map +1 -1
- package/dist/GeoTz.js +1 -2
- package/dist/GeoTz.js.map +1 -1
- package/dist/GeolocationTags.js +2 -2
- package/dist/GeolocationTags.js.map +1 -1
- package/dist/ImageDataHashTag.d.ts +5 -4
- package/dist/IsWarning.js +1 -2
- package/dist/IsWarning.js.map +1 -1
- package/dist/JSON.js +1 -2
- package/dist/JSON.js.map +1 -1
- package/dist/Lazy.js +1 -2
- package/dist/Lazy.js.map +1 -1
- package/dist/Maybe.js +5 -6
- package/dist/Maybe.js.map +1 -1
- package/dist/Number.js +3 -4
- package/dist/Number.js.map +1 -1
- package/dist/Object.d.ts +1 -0
- package/dist/Object.js +9 -6
- package/dist/Object.js.map +1 -1
- package/dist/Pick.js +1 -2
- package/dist/Pick.js.map +1 -1
- package/dist/ReadTask.d.ts +9 -4
- package/dist/ReadTask.js +12 -12
- package/dist/ReadTask.js.map +1 -1
- package/dist/ResourceEvent.js +1 -2
- package/dist/ResourceEvent.js.map +1 -1
- package/dist/Sidecars.js +2 -2
- package/dist/Sidecars.js.map +1 -1
- package/dist/String.js +12 -13
- package/dist/String.js.map +1 -1
- package/dist/Struct.js +1 -2
- package/dist/Struct.js.map +1 -1
- package/dist/Tags.d.ts +323 -327
- package/dist/TimeParsing.js +3 -4
- package/dist/TimeParsing.js.map +1 -1
- package/dist/Times.js +1 -2
- package/dist/Times.js.map +1 -1
- package/dist/Timezones.d.ts +1 -1
- package/dist/Timezones.js +21 -16
- package/dist/Timezones.js.map +1 -1
- package/dist/Version.js +1 -2
- package/dist/Version.js.map +1 -1
- package/dist/Which.js +1 -2
- package/dist/Which.js.map +1 -1
- package/dist/WriteTask.d.ts +6 -4
- package/dist/WriteTask.js +30 -21
- package/dist/WriteTask.js.map +1 -1
- package/package.json +26 -25
- package/snyk-linux +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -25,9 +25,30 @@ vendored versions of ExifTool match the version that they vendor.
|
|
|
25
25
|
|
|
26
26
|
## Version history
|
|
27
27
|
|
|
28
|
+
### v28.0.0
|
|
29
|
+
|
|
30
|
+
- 🌱/✨/🐞 ExifTool upgraded to [v12.89](https://exiftool.org/history.html#12.89). Notably, ExifTool on Windows is now using the "official" packaging. This should be equivalent to prior builds, as [exiftool-vendored.exe](https://github.com/photostructure/exiftool-vendored.exe) was already using Oliver Betz's perl launcher.
|
|
31
|
+
|
|
32
|
+
- 💔 Prior versions included `APP1Tags`, `APP4Tags`, `APP5Tags`, `APP6Tags`, `APP12Tags`, and `APP14Tags`. Unfortunately, due to field name duplications, fields could hop between these interfaces between versions. These have all been collapsed into a single new `APPTags`.
|
|
33
|
+
|
|
34
|
+
- ✨ Added support for [old Sony A7 UTC inference](https://github.com/photostructure/exiftool-vendored.js/issues/187). Thanks for the help, [Friso Smit](https://github.com/fwsmit)!
|
|
35
|
+
|
|
36
|
+
- ✨ Added support for [Android Motion Photos](https://github.com/photostructure/exiftool-vendored.js/issues/189). Thanks for the help, [Lukas](https://github.com/lukashass)!
|
|
37
|
+
|
|
38
|
+
- 📦 Updated `ReadTask` and `WriteTask` constructors to be public as well as the `.parse()` methods as a workaround for [#190](https://github.com/photostructure/exiftool-vendored.js/issues/190)
|
|
39
|
+
|
|
40
|
+
### v27.0.0
|
|
41
|
+
|
|
42
|
+
- 💔 `ExifToolOptions.struct` is now `"undef" | 0 | 1 | 2`. See
|
|
43
|
+
[#184](https://github.com/photostructure/exiftool-vendored.js/issues/184)
|
|
44
|
+
|
|
45
|
+
- ✨ `ExifToolOptions` now includes `readArgs` and `writeArgs`, which can be
|
|
46
|
+
specified both at `ExifTool` construction, as well as calls to `ExifTool.read`
|
|
47
|
+
and `ExifTool.write`. The prior method signatures are deprecated.
|
|
48
|
+
|
|
28
49
|
### v26.2.0
|
|
29
50
|
|
|
30
|
-
- ✨ Support for all ExifTool `struct` modes (fixes [#184](https://github.com/photostructure/exiftool-vendored.js/issues/184)).
|
|
51
|
+
- ✨ Support for all ExifTool `struct` modes (fixes [#184](https://github.com/photostructure/exiftool-vendored.js/issues/184)). See [ExifToolOptions.struct](https://photostructure.github.io/exiftool-vendored.js/interfaces/ExifToolOptions.html#struct) for details.
|
|
31
52
|
|
|
32
53
|
- 📦 Fix documentation to reference ExifTool.read() (fixes [#183](https://github.com/photostructure/exiftool-vendored.js/issues/183))
|
|
33
54
|
|
|
@@ -307,13 +328,16 @@ vendored versions of ExifTool match the version that they vendor.
|
|
|
307
328
|
|
|
308
329
|
- 📦 EXIF and ISO dates without specified seconds or milliseconds are now allowed
|
|
309
330
|
|
|
331
|
+
- 📦 Switched `package.json` scripts from `yarn` to `npm`, as yarn@1 doesn't
|
|
332
|
+
work with Node v22.5 and GitHub Actions.
|
|
333
|
+
|
|
310
334
|
### v20.0.0
|
|
311
335
|
|
|
312
336
|
- 💔 `ExifTool.write` took a generic that defaulted to `WriteTags`, but the type wasn't used for anything. I removed the generic typing, which may require consumers to change their code.
|
|
313
337
|
|
|
314
338
|
- 🌱 ExifTool upgraded to [v12.55](https://exiftool.org/history.html#v12.55)
|
|
315
339
|
|
|
316
|
-
- 📦 `
|
|
340
|
+
- 📦 `npm run prettier` now re-organizes imports
|
|
317
341
|
|
|
318
342
|
- 📦 Updated dependencies, re-ran prettier, rebuilt tags, rebuilt docs
|
|
319
343
|
|
package/README.md
CHANGED
|
@@ -43,18 +43,18 @@
|
|
|
43
43
|
or
|
|
44
44
|
|
|
45
45
|
npm install --save exiftool-vendored
|
|
46
|
-
|
|
46
|
+
|
|
47
47
|
### Debug logging
|
|
48
48
|
|
|
49
49
|
If anything doesn't work, the first thing to try is enabling the logger.
|
|
50
50
|
|
|
51
51
|
You can provide a [Logger implementation](https://photostructure.github.io/batch-cluster.js/interfaces/Logger.html) via [`ExifToolOptions.logger`](https://photostructure.github.io/exiftool-vendored.js/interfaces/ExifToolOptions.html#logger), or set the environment variable `NODE_DEBUG=exiftool-vendored`. [See the debuglog() documentation](https://nodejs.org/docs/latest/api/util.html#utildebuglogsection-callback) for more details.
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
### Regarding use within Electron
|
|
54
54
|
|
|
55
55
|
Due to how different every Electron application setup is, and how new versions
|
|
56
56
|
frequently have breaking changes, **do not ask for help by opening a github
|
|
57
|
-
issue on this project.**
|
|
57
|
+
issue on this project.**
|
|
58
58
|
|
|
59
59
|
Please seek help via StackOverflow, the Electron discord, or other channels.
|
|
60
60
|
|
package/RELEASE.md
CHANGED
|
@@ -11,28 +11,25 @@
|
|
|
11
11
|
|
|
12
12
|
4. On POSIX, in `../exiftool-vendored.pl`:
|
|
13
13
|
|
|
14
|
-
1. `git stash -u && git fetch && git checkout main &&
|
|
15
|
-
1. Verify diffs are
|
|
14
|
+
1. `git stash -u && git fetch && git checkout main && npm install && npm run update && npm run test`
|
|
15
|
+
1. Verify diffs are reasonable, and commit
|
|
16
16
|
1. `npx release-it --only-version`
|
|
17
17
|
|
|
18
18
|
5. On Windows, in `...\exiftool-vendored.exe\`:
|
|
19
19
|
(The terminal built into vscode plays with `ncu` and `release-it` a bit nicer than CMD or Windows for Git's terminal)
|
|
20
20
|
|
|
21
|
-
1. `git stash -u && git fetch && git checkout main &&
|
|
22
|
-
1. Verify diffs are
|
|
21
|
+
1. `git stash -u && git fetch && git checkout main && npm install && npm run update && npm run test`
|
|
22
|
+
1. Verify diffs are reasonable, and commit
|
|
23
23
|
1. `npx release-it --only-version`
|
|
24
24
|
|
|
25
25
|
6. Finally, back on the POSIX box, release `exiftool-vendored`:
|
|
26
26
|
|
|
27
27
|
1. `cd ../exiftool-vendored.js`
|
|
28
|
-
1. `
|
|
29
|
-
1. `
|
|
30
|
-
1. `
|
|
31
|
-
1. `yarn prettier`
|
|
32
|
-
1. `yarn lint`
|
|
33
|
-
1. `yarn docs`
|
|
28
|
+
1. `npm run u`
|
|
29
|
+
1. `npm run mktags ../test-images` # < assumes `../test-images` has the full ExifTool sample image suite
|
|
30
|
+
1. `npm run prettier && npm run lint && npm run docs`
|
|
34
31
|
1. Verify docs were rebuilt successfully at <http://localhost:3000/index.html>
|
|
35
|
-
1. `
|
|
32
|
+
1. `npm run test`
|
|
36
33
|
1. Verify diffs are reasonable, `git commit` and `git push`
|
|
37
34
|
1. Verify [](https://github.com/photostructure/exiftool-vendored.js/actions/workflows/node.js.yml)
|
|
38
35
|
1. Update the [CHANGELOG.md](https://github.com/photostructure/exiftool-vendored.js/blob/main/CHANGELOG.md)
|
package/SECURITY.md
CHANGED
|
@@ -6,7 +6,7 @@ Only the latest version of this library is supported.
|
|
|
6
6
|
|
|
7
7
|
## Reporting a Vulnerability
|
|
8
8
|
|
|
9
|
-
If you find a vulnerability,
|
|
9
|
+
If you find a vulnerability, _or even think you have_, please send an email to
|
|
10
10
|
the author. Each signed git release by `mceachen` contains a monitored email
|
|
11
11
|
address.
|
|
12
12
|
|
package/dist/Array.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Maybe, MaybeNull } from "./Maybe";
|
|
2
2
|
export declare function isIterable(obj: any): obj is Iterable<any>;
|
|
3
|
+
export declare function ifArr(arr: unknown): Maybe<any[]>;
|
|
3
4
|
export declare function toA<T>(arr: undefined | null | T[] | T | Iterable<T>): T[];
|
|
4
5
|
export declare function compact<T>(array: MaybeNull<T>[]): T[];
|
|
5
6
|
/**
|
package/dist/Array.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isIterable = isIterable;
|
|
4
|
+
exports.ifArr = ifArr;
|
|
5
|
+
exports.toA = toA;
|
|
6
|
+
exports.compact = compact;
|
|
7
|
+
exports.filterInPlace = filterInPlace;
|
|
8
|
+
exports.uniq = uniq;
|
|
9
|
+
exports.shallowArrayEql = shallowArrayEql;
|
|
10
|
+
exports.sortBy = sortBy;
|
|
4
11
|
const String_1 = require("./String");
|
|
5
12
|
function isIterable(obj) {
|
|
6
13
|
return (obj != null &&
|
|
7
14
|
typeof obj !== "string" &&
|
|
8
15
|
typeof obj[Symbol.iterator] === "function");
|
|
9
16
|
}
|
|
10
|
-
|
|
17
|
+
function ifArr(arr) {
|
|
18
|
+
return Array.isArray(arr) ? arr : undefined;
|
|
19
|
+
}
|
|
11
20
|
function toA(arr) {
|
|
12
21
|
return Array.isArray(arr) // < strings are not arrays
|
|
13
22
|
? arr
|
|
@@ -19,11 +28,9 @@ function toA(arr) {
|
|
|
19
28
|
? Array.from(arr)
|
|
20
29
|
: [arr];
|
|
21
30
|
}
|
|
22
|
-
exports.toA = toA;
|
|
23
31
|
function compact(array) {
|
|
24
32
|
return array.filter((elem) => elem != null);
|
|
25
33
|
}
|
|
26
|
-
exports.compact = compact;
|
|
27
34
|
/**
|
|
28
35
|
* Remove all elements from the given array that return false from the given
|
|
29
36
|
* predicate `filter`.
|
|
@@ -40,7 +47,6 @@ function filterInPlace(arr, filter) {
|
|
|
40
47
|
arr.length = j;
|
|
41
48
|
return arr;
|
|
42
49
|
}
|
|
43
|
-
exports.filterInPlace = filterInPlace;
|
|
44
50
|
function uniq(arr) {
|
|
45
51
|
return arr.reduce((acc, ea) => {
|
|
46
52
|
if (acc.indexOf(ea) === -1)
|
|
@@ -48,7 +54,6 @@ function uniq(arr) {
|
|
|
48
54
|
return acc;
|
|
49
55
|
}, []);
|
|
50
56
|
}
|
|
51
|
-
exports.uniq = uniq;
|
|
52
57
|
// terrible implementation only for internal use
|
|
53
58
|
function shallowArrayEql(a, b) {
|
|
54
59
|
return (a != null &&
|
|
@@ -56,7 +61,6 @@ function shallowArrayEql(a, b) {
|
|
|
56
61
|
a.length === b.length &&
|
|
57
62
|
a.every((ea, idx) => ea === b[idx]));
|
|
58
63
|
}
|
|
59
|
-
exports.shallowArrayEql = shallowArrayEql;
|
|
60
64
|
/**
|
|
61
65
|
* Returns a copy of arr, stable sorted by the given constraint. Note that false
|
|
62
66
|
* < true, and that `f` may return an array for sort priorities, or undefined if
|
|
@@ -75,7 +79,6 @@ function sortBy(arr, f) {
|
|
|
75
79
|
.sort((a, b) => cmp(a.cmp, b.cmp))
|
|
76
80
|
.map((ea) => ea.item));
|
|
77
81
|
}
|
|
78
|
-
exports.sortBy = sortBy;
|
|
79
82
|
function cmp(a, b) {
|
|
80
83
|
// undefined == undefined:
|
|
81
84
|
if (a == null && b == null)
|
package/dist/Array.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Array.js","sourceRoot":"","sources":["../src/Array.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Array.js","sourceRoot":"","sources":["../src/Array.ts"],"names":[],"mappings":";;AAGA,gCAMC;AAED,sBAEC;AAED,kBAUC;AAED,0BAEC;AAMD,sCAUC;AAED,oBAKC;AAGD,0CAOC;AAWD,wBAeC;AAvFD,qCAAmC;AAEnC,SAAgB,UAAU,CAAC,GAAQ;IACjC,OAAO,CACL,GAAG,IAAI,IAAI;QACX,OAAO,GAAG,KAAK,QAAQ;QACvB,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAU,CAC3C,CAAA;AACH,CAAC;AAED,SAAgB,KAAK,CAAC,GAAY;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;AAC7C,CAAC;AAED,SAAgB,GAAG,CAAI,GAA6C;IAClE,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,2BAA2B;QACnD,CAAC,CAAE,GAAW;QACd,CAAC,CAAC,GAAG,IAAI,IAAI;YACX,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,IAAA,iBAAQ,EAAC,GAAG,CAAC,CAAC,+CAA+C;gBAC7D,CAAC,CAAC,CAAC,GAAQ,CAAC;gBACZ,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;oBACf,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;oBACjB,CAAC,CAAC,CAAC,GAAQ,CAAC,CAAA;AACtB,CAAC;AAED,SAAgB,OAAO,CAAI,KAAqB;IAC9C,OAAO,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AC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACnC,CAAC"}
|
package/dist/AsyncRetry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.retryOnReject =
|
|
3
|
+
exports.retryOnReject = retryOnReject;
|
|
4
4
|
function retryOnReject(f, maxRetries) {
|
|
5
5
|
let retries = 0;
|
|
6
6
|
const g = async () => {
|
|
@@ -19,5 +19,4 @@ function retryOnReject(f, maxRetries) {
|
|
|
19
19
|
};
|
|
20
20
|
return g();
|
|
21
21
|
}
|
|
22
|
-
exports.retryOnReject = retryOnReject;
|
|
23
22
|
//# sourceMappingURL=AsyncRetry.js.map
|
package/dist/AsyncRetry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncRetry.js","sourceRoot":"","sources":["../src/AsyncRetry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AsyncRetry.js","sourceRoot":"","sources":["../src/AsyncRetry.ts"],"names":[],"mappings":";;AAAA,sCAkBC;AAlBD,SAAgB,aAAa,CAC3B,CAAuB,EACvB,UAAkB;IAElB,IAAI,OAAO,GAAG,CAAC,CAAA;IACf,MAAM,CAAC,GAAqB,KAAK,IAAI,EAAE;QACrC,IAAI,CAAC;YACH,OAAO,MAAM,CAAC,EAAE,CAAA;QAClB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,OAAO,GAAG,UAAU,EAAE,CAAC;gBACzB,OAAO,EAAE,CAAA;gBACT,OAAO,CAAC,EAAE,CAAA;YACZ,CAAC;iBAAM,CAAC;gBACN,MAAM,GAAG,CAAA;YACX,CAAC;QACH,CAAC;IACH,CAAC,CAAA;IACD,OAAO,CAAC,EAAE,CAAA;AACZ,CAAC"}
|
package/dist/BinaryField.js
CHANGED
|
@@ -4,8 +4,10 @@ exports.BinaryField = void 0;
|
|
|
4
4
|
const Number_1 = require("./Number");
|
|
5
5
|
// "(Binary data 2506078 bytes, use -b option to extract)"
|
|
6
6
|
const BinaryFieldRE =
|
|
7
|
-
//
|
|
8
|
-
|
|
7
|
+
// 1000000000 bytes is 1 GB. The largest binary field I've seen is ~5 MB (7
|
|
8
|
+
// chars): 10 chars is absurdly large, and is just to avoid the
|
|
9
|
+
// `js/polynomial-redos` eslint rule.
|
|
10
|
+
/Binary(?: data)? (\d{1,10}) bytes/i;
|
|
9
11
|
class BinaryField {
|
|
10
12
|
constructor(bytes, rawValue) {
|
|
11
13
|
this.bytes = bytes;
|
package/dist/BinaryField.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BinaryField.js","sourceRoot":"","sources":["../src/BinaryField.ts"],"names":[],"mappings":";;;AACA,qCAAgC;AAEhC,0DAA0D;AAC1D,MAAM,aAAa;AACjB,
|
|
1
|
+
{"version":3,"file":"BinaryField.js","sourceRoot":"","sources":["../src/BinaryField.ts"],"names":[],"mappings":";;;AACA,qCAAgC;AAEhC,0DAA0D;AAC1D,MAAM,aAAa;AACjB,2EAA2E;AAC3E,+DAA+D;AAC/D,qCAAqC;AACrC,oCAAoC,CAAA;AAEtC,MAAa,WAAW;IACtB,YACW,KAAa,EACb,QAAgB;QADhB,UAAK,GAAL,KAAK,CAAQ;QACb,aAAQ,GAAR,QAAQ,CAAQ;IACxB,CAAC;IAEJ,MAAM;QACJ,OAAO;YACL,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAA;IACH,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAuC;QACrD,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IACnD,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,QAAgB;QAClC,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;QACvC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;YACd,MAAM,KAAK,GAAG,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YACzB,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;gBAClB,OAAO,IAAI,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;YACzC,CAAC;QACH,CAAC;QACD,OAAM;IACR,CAAC;CACF;AA5BD,kCA4BC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Found in newer Android Motion Photos
|
|
3
|
+
*
|
|
4
|
+
* @see https://github.com/photostructure/exiftool-vendored.js/pull/189
|
|
5
|
+
*/
|
|
6
|
+
export interface ContainerDirectoryItem {
|
|
7
|
+
Item: {
|
|
8
|
+
Length?: number;
|
|
9
|
+
Mime?: string;
|
|
10
|
+
Padding?: number;
|
|
11
|
+
Semantic?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContainerDirectoryItem.js","sourceRoot":"","sources":["../src/ContainerDirectoryItem.ts"],"names":[],"mappings":""}
|
package/dist/DateTime.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DayMs = exports.HourMs = exports.MinuteMs = exports.SecondMs = void 0;
|
|
4
|
+
exports.validDateTime = validDateTime;
|
|
5
|
+
exports.isDateOrTime = isDateOrTime;
|
|
6
|
+
exports.dateTimeToExif = dateTimeToExif;
|
|
7
|
+
exports.toExifString = toExifString;
|
|
8
|
+
exports.hms = hms;
|
|
4
9
|
const luxon_1 = require("luxon");
|
|
5
10
|
const ExifDate_1 = require("./ExifDate");
|
|
6
11
|
const ExifDateTime_1 = require("./ExifDateTime");
|
|
@@ -8,7 +13,6 @@ const ExifTime_1 = require("./ExifTime");
|
|
|
8
13
|
function validDateTime(dt) {
|
|
9
14
|
return dt != null && dt.isValid;
|
|
10
15
|
}
|
|
11
|
-
exports.validDateTime = validDateTime;
|
|
12
16
|
exports.SecondMs = 1000;
|
|
13
17
|
exports.MinuteMs = 60 * exports.SecondMs;
|
|
14
18
|
exports.HourMs = 60 * exports.MinuteMs;
|
|
@@ -19,13 +23,11 @@ function isDateOrTime(o) {
|
|
|
19
23
|
o instanceof ExifTime_1.ExifTime ||
|
|
20
24
|
luxon_1.DateTime.isDateTime(o));
|
|
21
25
|
}
|
|
22
|
-
exports.isDateOrTime = isDateOrTime;
|
|
23
26
|
function dateTimeToExif(d, opts) {
|
|
24
27
|
return d.toFormat("y:MM:dd HH:mm:ss" +
|
|
25
28
|
((opts === null || opts === void 0 ? void 0 : opts.includeMilliseconds) === true ? ".u" : "") +
|
|
26
29
|
((opts === null || opts === void 0 ? void 0 : opts.includeOffset) === false ? "" : "ZZ"));
|
|
27
30
|
}
|
|
28
|
-
exports.dateTimeToExif = dateTimeToExif;
|
|
29
31
|
function toExifString(d) {
|
|
30
32
|
var _a;
|
|
31
33
|
if (luxon_1.DateTime.isDateTime(d)) {
|
|
@@ -35,9 +37,7 @@ function toExifString(d) {
|
|
|
35
37
|
return (_a = d === null || d === void 0 ? void 0 : d.toExifString) === null || _a === void 0 ? void 0 : _a.call(d);
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
|
-
exports.toExifString = toExifString;
|
|
39
40
|
function hms(d, opts) {
|
|
40
41
|
return d.toFormat("HH:mm:ss" + ((opts === null || opts === void 0 ? void 0 : opts.includeMilliseconds) === true ? ".SSS" : ""));
|
|
41
42
|
}
|
|
42
|
-
exports.hms = hms;
|
|
43
43
|
//# sourceMappingURL=DateTime.js.map
|
package/dist/DateTime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTime.js","sourceRoot":"","sources":["../src/DateTime.ts"],"names":[],"mappings":";;;
|
|
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AC,aAAD,CAAC,uBAAD,CAAC,CAAE,YAAY,iDAAI,CAAA;IAC5B,CAAC;AACH,CAAC;AAED,SAAgB,GAAG,CACjB,CAAW,EACX,IAAwC;IAExC,OAAO,CAAC,CAAC,QAAQ,CACf,UAAU,GAAG,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,mBAAmB,MAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAChE,CAAA;AACH,CAAC"}
|
|
@@ -86,8 +86,23 @@ exports.DefaultExifToolOptions = Object.freeze({
|
|
|
86
86
|
"GPSLongitude",
|
|
87
87
|
"GPSPosition",
|
|
88
88
|
"Orientation",
|
|
89
|
+
// NOT Rotation! Rotation can be encoded as degrees rotated clockwise, or a
|
|
90
|
+
// EXIF-Orientation string (!!). If we ask ExifTool for numeric rotations of HEICs,
|
|
91
|
+
// we get "3" (when it means "Rotate 90 CW"):
|
|
92
|
+
// $ exiftool -j -Rotation -Orientation IMG_6947.HEIC
|
|
93
|
+
// [{
|
|
94
|
+
// "Rotation": "Rotate 90 CW",
|
|
95
|
+
// "Orientation": "Rotate 90 CW"
|
|
96
|
+
// }]
|
|
97
|
+
// $ exiftool -j -Rotation# -Orientation# IMG_6947.HEIC
|
|
98
|
+
// [{
|
|
99
|
+
// "Rotation": 3, // < WTH is this? 3 means 180º (!?)
|
|
100
|
+
// "Orientation": 6 // < expected
|
|
101
|
+
// }]
|
|
89
102
|
],
|
|
90
103
|
useMWG: false,
|
|
91
104
|
struct: 1,
|
|
105
|
+
readArgs: ["-fast"],
|
|
106
|
+
writeArgs: [],
|
|
92
107
|
});
|
|
93
108
|
//# sourceMappingURL=DefaultExifToolOptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultExifToolOptions.js","sourceRoot":"","sources":["../src/DefaultExifToolOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;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IAAI;IAC1B,WAAW,EAAE,CAAC;IACd,YAAY,EAAZ,2BAAY;IACZ,YAAY,EAAE,yCAAmB;IACjC,WAAW,EAAE,EAAE;IACf,SAAS,EAAE,CAAC,IAAA,iBAAO,GAAE;IACrB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,qBAAqB;IAClC,cAAc,EAAE,IAAI,yBAAW,EAAE,CAAC,OAAO;IACzC,yBAAyB,EAAE,KAAK;IAChC,kBAAkB,EAAE,kBAAkB;IAEtC,iBAAiB,EAAE,IAAI;IACvB,kBAAkB,EAAE,IAAI;IACxB,KAAK,EAAE,aAAK;IACZ,WAAW,EAAE,KAAK;IAClB,oBAAoB,EAAE,IAAI;IAC1B,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,SAAS;IAC9B,2BAA2B,EAAE,KAAK,EAAE,2BAA2B;IAC/D,8BAA8B,EAAE,CAAC,GAAG,uCAAkB,CAAC;IACvD,MAAM;IACN,WAAW,EAAE;QACX,YAAY;QACZ,aAAa;QACb,aAAa;QACb,cAAc;QACd,aAAa;QACb,aAAa;QACb,2EAA2E;QAC3E,mFAAmF;QACnF,6CAA6C;QAE7C,qDAAqD;QACrD,KAAK;QACL,gCAAgC;QAChC,kCAAkC;QAClC,KAAK;QAEL,uDAAuD;QACvD,KAAK;QACL,yDAAyD;QACzD,mCAAmC;QACnC,KAAK;KACN;IACD,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,SAAS,EAAE,EAAE;CACd,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.errorsAndWarnings =
|
|
3
|
+
exports.errorsAndWarnings = errorsAndWarnings;
|
|
4
4
|
const Array_1 = require("./Array");
|
|
5
5
|
const String_1 = require("./String");
|
|
6
6
|
function errorsAndWarnings(task, t) {
|
|
@@ -9,5 +9,4 @@ function errorsAndWarnings(task, t) {
|
|
|
9
9
|
warnings: (0, Array_1.uniq)((0, String_1.compactBlanks)([t === null || t === void 0 ? void 0 : t.Warning, ...task.warnings])),
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
exports.errorsAndWarnings = errorsAndWarnings;
|
|
13
12
|
//# sourceMappingURL=ErrorsAndWarnings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorsAndWarnings.js","sourceRoot":"","sources":["../src/ErrorsAndWarnings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorsAndWarnings.js","sourceRoot":"","sources":["../src/ErrorsAndWarnings.ts"],"names":[],"mappings":";;AAoBA,8CAQC;AA5BD,mCAA8B;AAE9B,qCAAwC;AAkBxC,SAAgB,iBAAiB,CAC/B,IAAuB,EACvB,CAAwC;IAExC,OAAO;QACL,MAAM,EAAE,IAAA,YAAI,EAAC,IAAA,sBAAa,EAAC,CAAC,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvD,QAAQ,EAAE,IAAA,YAAI,EAAC,IAAA,sBAAa,EAAC,CAAC,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;KAC9D,CAAA;AACH,CAAC"}
|
package/dist/ExifDate.js
CHANGED
|
@@ -5,7 +5,7 @@ const luxon_1 = require("luxon");
|
|
|
5
5
|
const DateTime_1 = require("./DateTime");
|
|
6
6
|
const Maybe_1 = require("./Maybe");
|
|
7
7
|
const String_1 = require("./String");
|
|
8
|
-
const StrictExifRE = /^\d
|
|
8
|
+
const StrictExifRE = /^\d{1,4}:\d{1,2}:\d{1,2}|\d{1,4}-\d{1,2}-\d{1,2}$/;
|
|
9
9
|
const LooseExifRE = /^\S+\s+\S+\s+\S+$/;
|
|
10
10
|
/**
|
|
11
11
|
* Encodes an ExifDate
|
package/dist/ExifDate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExifDate.js","sourceRoot":"","sources":["../src/ExifDate.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAEhC,yCAAkD;AAClD,mCAAkD;AAClD,qCAA2C;AAE3C,MAAM,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"ExifDate.js","sourceRoot":"","sources":["../src/ExifDate.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAEhC,yCAAkD;AAClD,mCAAkD;AAClD,qCAA2C;AAE3C,MAAM,YAAY,GAAG,mDAAmD,CAAA;AACxE,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAEvC;;GAEG;AACH,MAAa,QAAQ;IACnB,MAAM,CAAC,IAAI,CAAC,SAAiB;;QAC3B,OAAO;QACL,0BAA0B;QAC1B,MAAA,MAAA,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,mCAC9B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,mCACvB,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAC9B,CAAA;IACH,CAAC;IACD,MAAM,CAAC,OAAO,CAAC,IAAY;QACzB,OAAO,YAAY,CAAC,IAAI,CAAC,IAAA,YAAG,EAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;YACxC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,gBAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;YACjD,CAAC,CAAC,SAAS,CAAA;IACf,CAAC;IAEO,MAAM,CAAC,YAAY,CAAC,IAAY,EAAE,IAAc;QACtD,IAAI,IAAA,cAAK,EAAC,IAAI,CAAC;YAAE,OAAM;QACvB,IAAI,GAAG,IAAA,YAAG,EAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;QACvB,KAAK,MAAM,GAAG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A;IACH,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAoC;QAClD,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IACrE,CAAC;CACF;AAzGD,4BAyGC"}
|
package/dist/ExifTool.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import * as bc from "batch-cluster";
|
|
2
|
+
import { ContainerDirectoryItem } from "./ContainerDirectoryItem";
|
|
3
3
|
import { Defined, DefinedOrNullValued } from "./Defined";
|
|
4
4
|
import { ErrorsAndWarnings } from "./ErrorsAndWarnings";
|
|
5
5
|
import { ExifToolOptions } from "./ExifToolOptions";
|
|
@@ -16,7 +16,7 @@ import { ReadTaskOptions } from "./ReadTask";
|
|
|
16
16
|
import { ResourceEvent } from "./ResourceEvent";
|
|
17
17
|
import { ShortcutTags } from "./ShortcutTags";
|
|
18
18
|
import { Struct } from "./Struct";
|
|
19
|
-
import {
|
|
19
|
+
import { APPTags, CompositeTags, EXIFTags, ExifToolTags, FileTags, FlashPixTags, GeolocationTags, IPTCTags, JFIFTags, MPFTags, MakerNotesTags, MetaTags, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, Tags, XMPTags } from "./Tags";
|
|
20
20
|
import { Version } from "./Version";
|
|
21
21
|
import { AdditionalWriteTags, ExpandedDateTags, MutableTags, StructAppendTags, WriteTags } from "./WriteTags";
|
|
22
22
|
import { WriteTaskOptions, WriteTaskResult } from "./WriteTask";
|
|
@@ -35,7 +35,7 @@ export { parseJSON } from "./JSON";
|
|
|
35
35
|
export { DefaultReadTaskOptions } from "./ReadTask";
|
|
36
36
|
export { UnsetZone, UnsetZoneName, UnsetZoneOffsetMinutes, defaultVideosToUTC, offsetMinutesToZoneName, } from "./Timezones";
|
|
37
37
|
export { DefaultWriteTaskOptions } from "./WriteTask";
|
|
38
|
-
export type {
|
|
38
|
+
export type { APPTags, AdditionalWriteTags, IPTCApplicationRecordTags as ApplicationRecordTags, CollectionInfo, CompositeTags, ContainerDirectoryItem, Defined, DefinedOrNullValued, EXIFTags, ErrorsAndWarnings, ExifToolOptions, ExifToolTags, ExifToolTaskOptions, ExifToolVendoredTags, ExpandedDateTags, FileTags, FlashPixTags, GeolocationTags, ICCProfileTags, IPTCApplicationRecordTags, IPTCTags, JFIFTags, Json, KeywordInfoStruct, KeywordStruct, Literal, MPFTags, MWGCollectionsTags, MWGKeywordTags, MakerNotesTags, Maybe, MetaTags, MutableTags, Omit, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, RawTags, ReadTaskOptions, ResourceEvent, ShortcutTags, Struct, StructAppendTags, Tags, Version, WriteTags, WriteTaskOptions, WriteTaskResult, XMPTags, };
|
|
39
39
|
/**
|
|
40
40
|
* Manages delegating calls to a cluster of ExifTool child processes.
|
|
41
41
|
*
|
|
@@ -73,33 +73,53 @@ export declare class ExifTool {
|
|
|
73
73
|
/**
|
|
74
74
|
* Read the tags in `file`.
|
|
75
75
|
*
|
|
76
|
-
* @param
|
|
76
|
+
* @param file the file to extract metadata tags from
|
|
77
77
|
*
|
|
78
|
-
* @param
|
|
79
|
-
*
|
|
80
|
-
* `readRaw`.** Note that the default is "-fast", so if you want ExifTool to
|
|
81
|
-
* read the entire file for metadata, you should pass an empty array as the
|
|
82
|
-
* second parameter. See https://exiftool.org/#performance for more
|
|
83
|
-
* information about `-fast` and `-fast2`.
|
|
78
|
+
* @param options overrides to the default ExifTool options provided to the
|
|
79
|
+
* ExifTool constructor.
|
|
84
80
|
*
|
|
85
|
-
* @returns
|
|
86
|
-
*
|
|
81
|
+
* @returns A resolved Tags promise. If there are errors during reading, the
|
|
82
|
+
* `.errors` field will be present.
|
|
87
83
|
*/
|
|
88
|
-
read<T extends Tags = Tags>(file: string,
|
|
84
|
+
read<T extends Tags = Tags>(file: string, options?: ReadTaskOptions): Promise<T>;
|
|
89
85
|
/**
|
|
90
|
-
* Read the tags
|
|
91
|
-
*
|
|
86
|
+
* Read the tags in `file`.
|
|
87
|
+
*
|
|
88
|
+
* @param file the file to extract metadata tags from
|
|
89
|
+
*
|
|
90
|
+
* @param readArgs any additional ExifTool arguments, like `["-fast"]`,
|
|
91
|
+
* `["-fast2"]`, `["-g"]`, or `["-api", "largefilesupport=1"]`. Note that
|
|
92
|
+
* providing a value here will override the `readArgs` array provided to the
|
|
93
|
+
* ExifTool constructor. **Note that most other arguments will require you to
|
|
94
|
+
* use `readRaw`.** Note that the default is `["-fast"]`, so if you want
|
|
95
|
+
* ExifTool to read the entire file for metadata, you should pass an empty
|
|
96
|
+
* array as the second parameter. See https://exiftool.org/#performance for
|
|
97
|
+
* more information about `-fast` and `-fast2`.
|
|
98
|
+
*
|
|
99
|
+
* @param options overrides to the default ExifTool options provided to the
|
|
100
|
+
* ExifTool constructor.
|
|
101
|
+
*
|
|
102
|
+
* @returns A resolved Tags promise. If there are errors during reading, the
|
|
103
|
+
* `.errors` field will be present.
|
|
104
|
+
*
|
|
105
|
+
* @deprecated use
|
|
106
|
+
* {@link ExifTool.read(file: string, options?: ReadTaskOptions)} instead
|
|
107
|
+
* (move `readArgs` into your `options` hash)
|
|
108
|
+
*/
|
|
109
|
+
read<T extends Tags = Tags>(file: string, readArgs?: string[], options?: ReadTaskOptions): Promise<T>;
|
|
110
|
+
/**
|
|
111
|
+
* Read the tags from `file`, without any post-processing of ExifTool values.
|
|
92
112
|
*
|
|
93
|
-
* **You probably want `read`, not this method. READ THE REST OF THIS
|
|
94
|
-
*
|
|
113
|
+
* **You probably want `read`, not this method. READ THE REST OF THIS COMMENT
|
|
114
|
+
* CAREFULLY.**
|
|
95
115
|
*
|
|
96
|
-
* If you want to extract specific tag values from a file, you may want to
|
|
97
|
-
*
|
|
98
|
-
*
|
|
116
|
+
* If you want to extract specific tag values from a file, you may want to use
|
|
117
|
+
* this, but all data validation and inference heuristics provided by `read`
|
|
118
|
+
* will be skipped.
|
|
99
119
|
*
|
|
100
|
-
* Note that performance will be very similar to `read`, and will actually
|
|
101
|
-
*
|
|
102
|
-
*
|
|
120
|
+
* Note that performance will be very similar to `read`, and will actually be
|
|
121
|
+
* worse if you don't include `-fast` or `-fast2` (as the most expensive bit
|
|
122
|
+
* is the perl interpreter and scanning the file on disk).
|
|
103
123
|
*
|
|
104
124
|
* @param args any additional arguments other than the file path. Note that
|
|
105
125
|
* "-json", and the Windows unicode filename handler flags, "-charset
|
|
@@ -116,17 +136,44 @@ export declare class ExifTool {
|
|
|
116
136
|
/**
|
|
117
137
|
* Write the given `tags` to `file`.
|
|
118
138
|
*
|
|
119
|
-
* @param
|
|
120
|
-
*
|
|
121
|
-
* @param
|
|
139
|
+
* @param file an existing file to write `tags` to
|
|
140
|
+
*
|
|
141
|
+
* @param tags the tags to write to `file`
|
|
142
|
+
*
|
|
143
|
+
* @param options overrides to the default ExifTool options provided to the
|
|
144
|
+
* ExifTool constructor.
|
|
145
|
+
*
|
|
146
|
+
* @return Either the promise will be resolved if the tags are written to
|
|
147
|
+
* successfully, or the promise will be rejected if there are errors or
|
|
148
|
+
* warnings.
|
|
149
|
+
*
|
|
150
|
+
* @see https://exiftool.org/exiftool_pod.html#overwrite_original
|
|
151
|
+
*/
|
|
152
|
+
write(file: string, tags: WriteTags, options?: WriteTaskOptions): Promise<WriteTaskResult>;
|
|
153
|
+
/**
|
|
154
|
+
* Write the given `tags` to `file`.
|
|
155
|
+
*
|
|
156
|
+
* @param file an existing file to write `tags` to
|
|
157
|
+
*
|
|
158
|
+
* @param tags the tags to write to `file`.
|
|
159
|
+
*
|
|
160
|
+
* @param writeArgs any additional ExifTool arguments, like `-n`, or
|
|
122
161
|
* `-overwrite_original`.
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
162
|
+
*
|
|
163
|
+
* @param options overrides to the default ExifTool options provided to the
|
|
164
|
+
* ExifTool constructor.
|
|
165
|
+
*
|
|
166
|
+
* @returns Either the promise will be resolved if the tags are written to
|
|
167
|
+
* successfully, or the promise will be rejected if there are errors or
|
|
168
|
+
* warnings.
|
|
169
|
+
*
|
|
127
170
|
* @see https://exiftool.org/exiftool_pod.html#overwrite_original
|
|
171
|
+
*
|
|
172
|
+
* @deprecated use
|
|
173
|
+
* {@link ExifTool.write(file: string, tags: WriteTags, options?: WriteTaskOptions)}
|
|
174
|
+
* instead (move `writeArgs` into your `options` hash)
|
|
128
175
|
*/
|
|
129
|
-
write(file: string, tags: WriteTags,
|
|
176
|
+
write(file: string, tags: WriteTags, writeArgs?: string[], options?: WriteTaskOptions): Promise<WriteTaskResult>;
|
|
130
177
|
/**
|
|
131
178
|
* This will strip `file` of all metadata tags. The original file (with the
|
|
132
179
|
* name `${FILENAME}_original`) will be retained. Note that some tags, like
|
|
@@ -205,7 +252,7 @@ export declare class ExifTool {
|
|
|
205
252
|
*
|
|
206
253
|
* @param {string} inputFile the path to the problematic image
|
|
207
254
|
* @param {string} outputFile the path to write the repaired image
|
|
208
|
-
* @param {boolean} allowMakerNoteRepair if there are problems with MakerNote
|
|
255
|
+
* @param {boolean} opts.allowMakerNoteRepair if there are problems with MakerNote
|
|
209
256
|
* tags, allow ExifTool to apply heuristics to recover corrupt tags. See
|
|
210
257
|
* exiftool's `-F` flag.
|
|
211
258
|
* @return {Promise<void>} resolved when outputFile has been written.
|