Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 895c1c3

Browse files
wolfg1969xemle
authored andcommittedJan 10, 2025·
add shutter speed and focal length, fix empty aperture
1 parent 5d401c2 commit 895c1c3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎packages/database/src/media/exif.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ const getFractionNumber = (exif, prop) => {
1717
result[`${prop}Divider`] = +match[2]
1818
} else if (typeof exif[prop] === 'number') {
1919
result[`${prop}Value`] = exif[prop]
20+
} else {
21+
result[`${prop}Value`] = +exif[prop]
2022
}
21-
result[`${prop}Value`] = +exif[prop]
23+
return result
2224
}
2325

2426
const widthHeight = (entry, exif) => {
@@ -72,7 +74,7 @@ const getExif = (entry) => {
7274
make: exif.Make || 'unknown',
7375
model: exif.Model || 'unknown',
7476
iso: exif.ISO,
75-
aperture: exif.ApertureValue,
77+
aperture: exif.ApertureValue || exif.Aperture,
7678
exposureMode: exif.ExposureMode,
7779
focalLength: exif.FocalLength ? +(exif.FocalLength.replace(' mm', '')) : -1,
7880
focalLength33mm: exif.FocalLengthIn35mmFormat ? +(exif.FocalLengthIn35mmFormat.replace(' mm', '')) : -1,

‎packages/webapp/src/single/Details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export const Details = ({entry, dispatch}) => {
248248
)}
249249
</p>
250250
)}
251-
<p>ISO {entry.iso}, Aperture {entry.aperture}</p>
251+
<p>ISO {entry.iso}, Aperture {entry.aperture}, Shutter Speed {entry.ShutterSpeedRaw}, Focal Length {entry.focalLength}mm</p>
252252
</div>
253253
</div>
254254
{entry.objects.length > 0 && (

0 commit comments

Comments
 (0)
Please sign in to comment.