exifreader 4.5.0 → 4.5.1

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/exif-reader.d.ts CHANGED
@@ -131,7 +131,7 @@ interface ExpandedTags {
131
131
  pngFile?: PngFileTags,
132
132
  exif?: Tags,
133
133
  iptc?: Tags,
134
- xmp?: XmpTags,
134
+ xmp?: { _raw: string } & XmpTags,
135
135
  icc?: IccTags,
136
136
  Thumbnail?: ThumbnailTags,
137
137
  gps?: GpsTags
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exifreader",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "description": "Library that parses Exif metadata in images.",
5
5
  "author": "Mattias Wallander <mattias@wallander.eu>",
6
6
  "repository": {
@@ -21,7 +21,6 @@
21
21
  "webpack.config.js"
22
22
  ],
23
23
  "types": "./exif-reader.d.ts",
24
- "dependencies": {},
25
24
  "optionalDependencies": {
26
25
  "@xmldom/xmldom": "^0.7.5"
27
26
  },
@@ -9,6 +9,9 @@ export default {
9
9
  0x829a: {
10
10
  'name': 'ExposureTime',
11
11
  'description': (value) => {
12
+ if (value[0] >= value[1]) {
13
+ return `${Math.round(value[0] / value[1])}`;
14
+ }
12
15
  if (value[0] !== 0) {
13
16
  return `1/${Math.round(value[1] / value[0])}`;
14
17
  }
@@ -105,7 +108,11 @@ export default {
105
108
  0x9201: {
106
109
  'name': 'ShutterSpeedValue',
107
110
  'description': (value) => {
108
- return `1/${Math.round(Math.pow(2, value[0] / value[1]))}`;
111
+ const denominator = Math.pow(2, value[0] / value[1]);
112
+ if (denominator <= 1) {
113
+ return `${Math.round(1 / denominator)}`;
114
+ }
115
+ return `1/${Math.round(denominator)}`;
109
116
  }
110
117
  },
111
118
  0x9202: {