exifreader 4.23.5 → 4.23.6
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/README.md +6 -5
- package/bin/build.js +14 -12
- package/exif-reader.d.ts +25 -25
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -232,7 +232,7 @@ const tags = ExifReader.load(fileBuffer, {expanded: true});
|
|
|
232
232
|
|
|
233
233
|
If you're having trouble getting the GPS location, see [this comment and
|
|
234
234
|
thread](https://github.com/mattiasw/ExifReader/issues/177#issuecomment-1172228225)
|
|
235
|
-
for more details.
|
|
235
|
+
and the [GPS section below](#gps) for more details.
|
|
236
236
|
|
|
237
237
|
#### Grouping
|
|
238
238
|
|
|
@@ -288,10 +288,11 @@ be negative for values that are south of the equator, west of the IRM, or below
|
|
|
288
288
|
sealevel. These are often more convenient values for regular use. For some
|
|
289
289
|
elaboration or if you need the original values, see [Notes](#notes) below.
|
|
290
290
|
|
|
291
|
-
If you're having trouble getting the GPS values on Android and
|
|
292
|
-
`type="file"` input to upload the image, make sure you are
|
|
293
|
-
`accept`
|
|
294
|
-
strip the GPS
|
|
291
|
+
If you're having trouble getting the GPS values on Android (and possibly also
|
|
292
|
+
IOS) and are using a `type="file"` input to upload the image, make sure you are
|
|
293
|
+
**not** setting `accept="image/*"` on the input element. Apparently
|
|
294
|
+
setting the `accept` attribute to this value [will strip the GPS
|
|
295
|
+
values](https://github.com/mattiasw/ExifReader/issues/378#issuecomment-2302705983).
|
|
295
296
|
|
|
296
297
|
### Using the thumbnail
|
|
297
298
|
|
package/bin/build.js
CHANGED
|
@@ -7,28 +7,25 @@ const fs = require('fs');
|
|
|
7
7
|
const {execSync} = require('child_process');
|
|
8
8
|
const dependentHasExifReaderConfig = require('./findDependentConfig');
|
|
9
9
|
|
|
10
|
-
const WEBPACK_VERSION = '5.89.0';
|
|
11
|
-
const WEBPACK_CLI_VERSION = '5.1.4';
|
|
12
|
-
|
|
13
10
|
const EXIFREADER_ROOT_DIR = path.join(__dirname, '..');
|
|
14
11
|
process.chdir(EXIFREADER_ROOT_DIR);
|
|
15
12
|
|
|
16
13
|
if (!process.argv.includes('--only-with-config') || checkConfig()) {
|
|
17
|
-
execSync(`npx -p webpack-cli
|
|
14
|
+
execSync(`npx -p ${getPackage('webpack-cli')} -p ${getPackage('webpack')} webpack`, {stdio: 'inherit'});
|
|
18
15
|
}
|
|
19
16
|
|
|
20
17
|
function checkConfig() {
|
|
21
18
|
if (dependentHasExifReaderConfig()) {
|
|
22
19
|
console.log('Installing ExifReader custom build dependencies...'); // eslint-disable-line no-console
|
|
23
20
|
const packages = [
|
|
24
|
-
'@babel/core
|
|
25
|
-
'@babel/preset-env
|
|
26
|
-
'@babel/register
|
|
27
|
-
'babel-loader
|
|
28
|
-
'cross-env
|
|
29
|
-
'string-replace-loader
|
|
30
|
-
'terser-webpack-plugin
|
|
31
|
-
];
|
|
21
|
+
'@babel/core',
|
|
22
|
+
'@babel/preset-env',
|
|
23
|
+
'@babel/register',
|
|
24
|
+
'babel-loader',
|
|
25
|
+
'cross-env',
|
|
26
|
+
'string-replace-loader',
|
|
27
|
+
'terser-webpack-plugin'
|
|
28
|
+
].map((_package) => getPackage(_package));
|
|
32
29
|
const tmpDir = path.join(EXIFREADER_ROOT_DIR, '__tmp');
|
|
33
30
|
try {
|
|
34
31
|
initTmpDir(tmpDir);
|
|
@@ -44,6 +41,11 @@ function checkConfig() {
|
|
|
44
41
|
return false;
|
|
45
42
|
}
|
|
46
43
|
|
|
44
|
+
function getPackage(name) {
|
|
45
|
+
const version = require(path.join(EXIFREADER_ROOT_DIR, 'package.json')).devDependencies[name].replace(/^\^/, '');
|
|
46
|
+
return `${name}@${version}`;
|
|
47
|
+
}
|
|
48
|
+
|
|
47
49
|
function initTmpDir(tmpDir) {
|
|
48
50
|
const nodeModulesDir = path.join(EXIFREADER_ROOT_DIR, 'node_modules');
|
|
49
51
|
fs.mkdirSync(tmpDir, {recursive: true});
|
package/exif-reader.d.ts
CHANGED
|
@@ -293,8 +293,8 @@ interface ExifTags {
|
|
|
293
293
|
'SamplesPerPixel'?: NumberTag,
|
|
294
294
|
'RowsPerStrip'?: NumberTag,
|
|
295
295
|
'StripByteCounts'?: NumberArrayTag,
|
|
296
|
-
'XResolution'?:
|
|
297
|
-
'YResolution'?:
|
|
296
|
+
'XResolution'?: RationalTag | NumberFileTag, // Also in JFIF tags.
|
|
297
|
+
'YResolution'?: RationalTag | NumberFileTag, // Also in JFIF tags.
|
|
298
298
|
'PlanarConfiguration'?: NumberTag,
|
|
299
299
|
'ResolutionUnit'?: NumberTag,
|
|
300
300
|
'TransferFunction'?: NumberArrayTag,
|
|
@@ -321,30 +321,30 @@ interface ExifTags {
|
|
|
321
321
|
'JFIF Thumbnail'?: JfifThumbnailTag,
|
|
322
322
|
|
|
323
323
|
// Exif tags
|
|
324
|
-
'ExposureTime'?:
|
|
325
|
-
'FNumber'?:
|
|
324
|
+
'ExposureTime'?: RationalTag,
|
|
325
|
+
'FNumber'?: RationalTag,
|
|
326
326
|
'ExposureProgram'?: NumberTag,
|
|
327
327
|
'SpectralSensitivity'?: StringArrayTag,
|
|
328
|
-
'ISOSpeedRatings'?: NumberTag
|
|
329
|
-
'OECF'?:
|
|
328
|
+
'ISOSpeedRatings'?: NumberTag | NumberArrayTag,
|
|
329
|
+
'OECF'?: unknown,
|
|
330
330
|
'ExifVersion'?: NumberArrayTag,
|
|
331
331
|
'DateTimeOriginal'?: StringArrayTag,
|
|
332
332
|
'DateTimeDigitized'?: StringArrayTag,
|
|
333
333
|
'ComponentsConfiguration'?: NumberArrayTag,
|
|
334
|
-
'CompressedBitsPerPixel'?:
|
|
335
|
-
'ShutterSpeedValue'?:
|
|
336
|
-
'ApertureValue'?:
|
|
337
|
-
'BrightnessValue'?:
|
|
338
|
-
'ExposureBiasValue'?:
|
|
339
|
-
'MaxApertureValue'?:
|
|
340
|
-
'SubjectDistance'?:
|
|
334
|
+
'CompressedBitsPerPixel'?: RationalTag,
|
|
335
|
+
'ShutterSpeedValue'?: RationalTag,
|
|
336
|
+
'ApertureValue'?: RationalTag,
|
|
337
|
+
'BrightnessValue'?: RationalTag,
|
|
338
|
+
'ExposureBiasValue'?: RationalTag,
|
|
339
|
+
'MaxApertureValue'?: RationalTag,
|
|
340
|
+
'SubjectDistance'?: RationalTag,
|
|
341
341
|
'MeteringMode'?: NumberTag,
|
|
342
342
|
'LightSource'?: NumberTag,
|
|
343
343
|
'Flash'?: NumberTag,
|
|
344
|
-
'FocalLength'?:
|
|
344
|
+
'FocalLength'?: RationalTag,
|
|
345
345
|
'SubjectArea'?: NumberArrayTag,
|
|
346
|
-
'MakerNote'?:
|
|
347
|
-
'UserComment'?:
|
|
346
|
+
'MakerNote'?: unknown,
|
|
347
|
+
'UserComment'?: unknown,
|
|
348
348
|
'SubSecTime'?: StringArrayTag,
|
|
349
349
|
'SubSecTimeOriginal'?: StringArrayTag,
|
|
350
350
|
'SubSecTimeDigitized'?: StringArrayTag,
|
|
@@ -355,27 +355,27 @@ interface ExifTags {
|
|
|
355
355
|
'RelatedSoundFile'?: StringArrayTag,
|
|
356
356
|
'Interoperability IFD Pointer'?: NumberTag,
|
|
357
357
|
'FlashEnergy'?: NumberTag,
|
|
358
|
-
'SpatialFrequencyResponse'?:
|
|
359
|
-
'FocalPlaneXResolution'?:
|
|
360
|
-
'FocalPlaneYResolution'?:
|
|
358
|
+
'SpatialFrequencyResponse'?: unknown,
|
|
359
|
+
'FocalPlaneXResolution'?: RationalTag,
|
|
360
|
+
'FocalPlaneYResolution'?: RationalTag,
|
|
361
361
|
'FocalPlaneResolutionUnit'?: NumberTag,
|
|
362
362
|
'SubjectLocation'?: NumberArrayTag,
|
|
363
|
-
'ExposureIndex'?:
|
|
363
|
+
'ExposureIndex'?: RationalTag,
|
|
364
364
|
'SensingMethod'?: NumberTag,
|
|
365
365
|
'FileSource'?: NumberTag,
|
|
366
366
|
'SceneType'?: NumberTag,
|
|
367
|
-
'CFAPattern'?:
|
|
367
|
+
'CFAPattern'?: unknown,
|
|
368
368
|
'CustomRendered'?: NumberTag,
|
|
369
369
|
'ExposureMode'?: NumberTag,
|
|
370
370
|
'WhiteBalance'?: NumberTag,
|
|
371
|
-
'DigitalZoomRatio'?:
|
|
371
|
+
'DigitalZoomRatio'?: RationalTag,
|
|
372
372
|
'FocalLengthIn35mmFilm'?: NumberTag,
|
|
373
373
|
'SceneCaptureType'?: NumberTag,
|
|
374
374
|
'GainControl'?: NumberTag,
|
|
375
375
|
'Contrast'?: NumberTag,
|
|
376
376
|
'Saturation'?: NumberTag,
|
|
377
377
|
'Sharpness'?: NumberTag,
|
|
378
|
-
'DeviceSettingDescription'?:
|
|
378
|
+
'DeviceSettingDescription'?: unknown,
|
|
379
379
|
'SubjectDistanceRange'?: NumberTag,
|
|
380
380
|
'ImageUniqueID'?: StringArrayTag,
|
|
381
381
|
'LensMake'?: StringArrayTag,
|
|
@@ -413,8 +413,8 @@ interface ExifTags {
|
|
|
413
413
|
'GPSDestBearing'?: NumberTag,
|
|
414
414
|
'GPSDestDistanceRef'?: StringArrayTag,
|
|
415
415
|
'GPSDestDistance'?: NumberTag,
|
|
416
|
-
'GPSProcessingMethod'?:
|
|
417
|
-
'GPSAreaInformation'?:
|
|
416
|
+
'GPSProcessingMethod'?: unknown,
|
|
417
|
+
'GPSAreaInformation'?: unknown,
|
|
418
418
|
'GPSDateStamp'?: StringArrayTag,
|
|
419
419
|
'GPSDifferential'?: NumberTag,
|
|
420
420
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exifreader",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.6",
|
|
4
4
|
"description": "Library that parses Exif metadata in images.",
|
|
5
5
|
"author": "Mattias Wallander <mattias@wallander.eu>",
|
|
6
6
|
"repository": {
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"@xmldom/xmldom": "^0.8.10"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@babel/core": "^7.
|
|
29
|
-
"@babel/preset-env": "^7.
|
|
30
|
-
"@babel/register": "^7.
|
|
28
|
+
"@babel/core": "^7.25.2",
|
|
29
|
+
"@babel/preset-env": "^7.25.4",
|
|
30
|
+
"@babel/register": "^7.24.6",
|
|
31
31
|
"@types/node": "^18.11.9",
|
|
32
|
-
"babel-loader": "^9.1
|
|
32
|
+
"babel-loader": "^9.2.1",
|
|
33
33
|
"babel-plugin-rewire": "^1.2.0",
|
|
34
34
|
"chai": "^4.3.10",
|
|
35
35
|
"cross-env": "^7.0.3",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"nyc": "^17.0.0",
|
|
43
43
|
"rimraf": "^5.0.5",
|
|
44
44
|
"string-replace-loader": "^3.1.0",
|
|
45
|
-
"terser-webpack-plugin": "^5.3.
|
|
45
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
46
46
|
"typescript": "^5.2.2",
|
|
47
47
|
"webpack": "^5.89.0",
|
|
48
48
|
"webpack-cli": "^5.1.4",
|