mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 01:11:32 +03:00
fix(server): use GPSLongitudeRef and GPSLatitudeRef EXIF fields (#21445)
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
@@ -84,6 +84,7 @@ export class MetadataRepository {
|
||||
numericTags: [...DefaultReadTaskOptions.numericTags, 'FocalLength', 'FileSize'],
|
||||
/* eslint unicorn/no-array-callback-reference: off, unicorn/no-array-method-this-argument: off */
|
||||
geoTz: (lat, lon) => geotz.find(lat, lon)[0],
|
||||
geolocation: true,
|
||||
// Enable exiftool LFS to parse metadata for files larger than 2GB.
|
||||
readArgs: ['-api', 'largefilesupport=1'],
|
||||
writeArgs: ['-api', 'largefilesupport=1', '-overwrite_original'],
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user