fix(server): use GPSLongitudeRef and GPSLatitudeRef EXIF fields (#21445)

Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
Rui Gonçalves
2025-10-21 15:12:22 +01:00
committed by GitHub
parent 9dffbaea98
commit dbd6dcb786
5 changed files with 33 additions and 27 deletions

View File

@@ -447,7 +447,10 @@ export class MetadataService extends BaseService {
* For RAW images in the CR2 or RAF format, the "ImageSize" value seems to be correct,
* but ImageWidth and ImageHeight are not correct (they contain the dimensions of the preview image).
*/
let [width, height] = exifTags.ImageSize?.split('x').map((dim) => Number.parseInt(dim) || undefined) || [];
let [width, height] =
exifTags.ImageSize?.toString()
?.split('x')
?.map((dim) => Number.parseInt(dim) || undefined) ?? [];
if (!width || !height) {
[width, height] = [exifTags.ImageWidth, exifTags.ImageHeight];
}