exifreader 4.20.0 → 4.21.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exifreader",
3
- "version": "4.20.0",
3
+ "version": "4.21.0",
4
4
  "description": "Library that parses Exif metadata in images.",
5
5
  "author": "Mattias Wallander <mattias@wallander.eu>",
6
6
  "repository": {
@@ -82,8 +82,12 @@ export default {
82
82
  return 'Unknown';
83
83
  },
84
84
  ExposureTime(value) {
85
- if (value[0] >= value[1]) {
86
- return `${Math.round(value[0] / value[1])}`;
85
+ if (value[0] / value[1] > 0.25) {
86
+ const decimal = value[0] / value[1];
87
+ if (Number.isInteger(decimal)) {
88
+ return '' + decimal;
89
+ }
90
+ return decimal.toFixed(1);
87
91
  }
88
92
  if (value[0] !== 0) {
89
93
  return `1/${Math.round(value[1] / value[0])}`;