exiftool-vendored
Advanced tools
Comparing version 24.2.0 to 24.3.0
@@ -29,2 +29,6 @@ # Changelog/Versioning | ||
### v24.3.0 | ||
- 📦 Relax GPS latitude/longitude parser to handle invalid Ref values (a warning will be appended to the [Tags.warnings field](https://photostructure.github.io/exiftool-vendored.js/interfaces/Tags.html#warnings)). See [#165](https://github.com/photostructure/exiftool-vendored.js/issues/165). | ||
### v24.2.0 | ||
@@ -36,3 +40,3 @@ | ||
- 📦 Relaxed `isWarning()` detection to be simply `/warning:/i`. v24.0.0 would throw errors when extracting binary thumbnails due to issues like "Warning: Ignored non-standard EXIF at TIFF-IFD0-JPEG-APP1-IFD0", which is decidedly a warning. `ExifTool.write` now leans (hard) on returning `.warnings` rather than throwing errors: **It is up to you to inspect `.warnings` and decide for your own usecase if the issue is exceptional**. See [issue #162](https://github.com/photostructure/exiftool-vendored.js/issues/162) for details. | ||
- 📦 Relaxed `isWarning()` detection to be simply `/warning:/i`. v24.0.0 would throw errors when extracting binary thumbnails due to issues like "Warning: Ignored non-standard EXIF at TIFF-IFD0-JPEG-APP1-IFD0", which is decidedly a warning. `ExifTool.write` now leans (hard) on returning [`Tags.warnings`](https://photostructure.github.io/exiftool-vendored.js/interfaces/Tags.html#warnings) rather than throwing errors: **It is up to you to inspect `.warnings` and decide for your own usecase if the issue is exceptional**. See [issue #162](https://github.com/photostructure/exiftool-vendored.js/issues/162) for details. | ||
@@ -39,0 +43,0 @@ ### v24.0.0 |
@@ -97,4 +97,14 @@ "use strict"; | ||
var _a, _b; | ||
(_a = this.lat) !== null && _a !== void 0 ? _a : (this.lat = __classPrivateFieldGet(this, _ReadTask_instances, "m", _ReadTask_latlon).call(this, "GPSLatitude", "S", 90)); | ||
(_b = this.lon) !== null && _b !== void 0 ? _b : (this.lon = __classPrivateFieldGet(this, _ReadTask_instances, "m", _ReadTask_latlon).call(this, "GPSLongitude", "W", 180)); | ||
(_a = this.lat) !== null && _a !== void 0 ? _a : (this.lat = __classPrivateFieldGet(this, _ReadTask_instances, "m", _ReadTask_latlon).call(this, { | ||
tagName: "GPSLatitude", | ||
positiveRef: "N", | ||
negativeRef: "S", | ||
maxValid: 90, | ||
})); | ||
(_b = this.lon) !== null && _b !== void 0 ? _b : (this.lon = __classPrivateFieldGet(this, _ReadTask_instances, "m", _ReadTask_latlon).call(this, { | ||
tagName: "GPSLongitude", | ||
positiveRef: "E", | ||
negativeRef: "W", | ||
maxValid: 180, | ||
})); | ||
if (this.options.ignoreZeroZeroLatLon && this.lat === 0 && this.lon === 0) { | ||
@@ -219,5 +229,6 @@ this.invalidLatLon = true; | ||
return tags; | ||
}, _ReadTask_latlon = function _ReadTask_latlon(tagName, negateRef, maxValid) { | ||
}, _ReadTask_latlon = function _ReadTask_latlon({ tagName, positiveRef, negativeRef, maxValid, }) { | ||
const tagValue = this._rawDegrouped[tagName]; | ||
const ref = this._rawDegrouped[tagName + "Ref"]; | ||
const refKey = tagName + "Ref"; | ||
const ref = this._rawDegrouped[refKey]; | ||
const result = (0, Number_1.toFloat)(tagValue); | ||
@@ -237,8 +248,13 @@ if (result == null) { | ||
else { | ||
// Versions of ExifTool pre-12 returned properly-negated lat/lon. ExifTool | ||
// 12+ always returns positive values (!!). Also: if '-GPS*#' is set, | ||
// we'll see "S" instead of "South", hence the .startsWith() instead of | ||
// ===: | ||
const negative = (0, String_1.toS)(ref).toUpperCase().startsWith(negateRef); | ||
return (negative ? -1 : 1) * Math.abs(result); | ||
// See https://github.com/photostructure/exiftool-vendored.js/issues/165 | ||
// and https://www.exiftool.org/TagNames/GPS.html | ||
const expectedPositive = ref.toUpperCase().startsWith(positiveRef) || ((0, Number_1.isNumber)(ref) && ref >= 0); | ||
const expectedNegative = ref.toUpperCase().startsWith(negativeRef) || ((0, Number_1.isNumber)(ref) && ref < 0); | ||
if (expectedPositive && result < 0) { | ||
this.warnings.push(`Invalid ${tagName} or ${refKey}: expected ${ref} ${tagName} > 0 but got ${result}`); | ||
} | ||
else if (expectedNegative && result > 0) { | ||
this.warnings.push(`Invalid ${tagName} or ${refKey}: expected ${ref} ${tagName} < 0 but got ${result}`); | ||
} | ||
return result; | ||
} | ||
@@ -245,0 +261,0 @@ }, _ReadTask_extractTzOffset = function _ReadTask_extractTzOffset() { |
{ | ||
"name": "exiftool-vendored", | ||
"version": "24.2.0", | ||
"version": "24.3.0", | ||
"description": "Efficient, cross-platform access to ExifTool", | ||
@@ -12,3 +12,3 @@ "main": "./dist/ExifTool.js", | ||
"scripts": { | ||
"u": "yarn npm-check-updates -u --install always", | ||
"u": "yarn npm-check-updates --upgrade --install always", | ||
"ci": "yarn install --frozen-lockfile", | ||
@@ -77,8 +77,8 @@ "clean": "rimraf lib dist coverage .nyc_output", | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^20.10.4", | ||
"@types/node": "^20.10.6", | ||
"@types/progress": "^2.0.7", | ||
"@types/tmp": "^0.2.6", | ||
"@types/xmldom": "^0.1.34", | ||
"@typescript-eslint/eslint-plugin": "^6.14.0", | ||
"@typescript-eslint/parser": "^6.14.0", | ||
"@typescript-eslint/eslint-plugin": "^6.17.0", | ||
"@typescript-eslint/parser": "^6.17.0", | ||
"@xmldom/xmldom": "^0.8.10", | ||
@@ -105,9 +105,9 @@ "chai": "^4.3.10", | ||
"tmp": "^0.2.1", | ||
"typedoc": "^0.25.4", | ||
"typedoc": "^0.25.6", | ||
"typescript": "^5.3.3", | ||
"xpath": "^0.0.33" | ||
"xpath": "^0.0.34" | ||
}, | ||
"dependencies-note": "@types/luxon is a proper dependency, not devDependency, as our exported TypeScript typings reference luxon types. See <https://github.com/photostructure/exiftool-vendored.js/pull/108>", | ||
"dependencies": { | ||
"@photostructure/tz-lookup": "^8.0.0", | ||
"@photostructure/tz-lookup": "^9.0.0", | ||
"@types/luxon": "^3.3.7", | ||
@@ -119,5 +119,5 @@ "batch-cluster": "^12.1.0", | ||
"optionalDependencies": { | ||
"exiftool-vendored.exe": "12.70.0", | ||
"exiftool-vendored.pl": "12.70.0" | ||
"exiftool-vendored.exe": "12.72.0", | ||
"exiftool-vendored.pl": "12.72.0" | ||
} | ||
} |
@@ -53,4 +53,4 @@ # exiftool-vendored | ||
- You shouldn't include either the `exiftool-vendored.exe` or | ||
`exiftool-vendored.pl` as direct dependencies to your project, unless you know | ||
- You shouldn't include either [exiftool-vendored.exe](https://github.com/photostructure/exiftool-vendored.exe) or | ||
[exiftool-vendored.pl](https://github.com/photostructure/exiftool-vendored.pl) as direct dependencies to your project, unless you know | ||
what you're doing. | ||
@@ -57,0 +57,0 @@ |
@@ -15,3 +15,3 @@ # Releasing new versions of `exiftool-vendored` | ||
1. `git stash -u ; git fetch ; git checkout main ; npx ncu -u && yarn install && ./update.sh && yarn test` | ||
1. `git stash -u && git fetch && git checkout main && yarn install && yarn update && yarn test` | ||
1. Verify diffs are in order, and commit | ||
@@ -24,3 +24,3 @@ 1. `npx release-it` | ||
1. `git stash -u ; git fetch ; git checkout main ; npx ncu -u --packageFile package.json && yarn install && ./update.sh && yarn test` | ||
1. `git stash -u && git fetch && git checkout main && yarn install && yarn update && yarn test` | ||
1. Verify diffs are in order, and commit | ||
@@ -32,3 +32,3 @@ 1. `npx release-it` | ||
1. `cd ../exiftool-vendored.js` | ||
1. `npx ncu -u` | ||
1. `yarn u` | ||
1. `yarn install` | ||
@@ -35,0 +35,0 @@ 1. `yarn mktags ../test-images` # < assumes ``../test-images`` has the full ExifTool sample image suite |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
554400
9552
+ Added@photostructure/tz-lookup@9.0.2(transitive)
+ Addedexiftool-vendored.exe@12.72.0(transitive)
+ Addedexiftool-vendored.pl@12.72.0(transitive)
- Removed@photostructure/tz-lookup@8.0.0(transitive)
- Removedexiftool-vendored.exe@12.70.0(transitive)
- Removedexiftool-vendored.pl@12.70.0(transitive)