Rearrange
This commit is contained in:
@@ -86,6 +86,17 @@ export const parseExif = (tags: RawExifTags) => {
|
||||
return metadata;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse GPS location from the metadata embedded in the file.
|
||||
*/
|
||||
const parseLocation = (tags: RawExifTags) => {
|
||||
const latitude = tags.gps?.Latitude;
|
||||
const longitude = tags.gps?.Longitude;
|
||||
return latitude !== undefined && longitude !== undefined
|
||||
? { latitude, longitude }
|
||||
: undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse a single "best" creation date for an image from the metadata embedded
|
||||
* in the file.
|
||||
@@ -364,17 +375,6 @@ const parseIPTCDate = (
|
||||
return new Date(s);
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse GPS location from the metadata embedded in the file.
|
||||
*/
|
||||
const parseLocation = (tags: RawExifTags) => {
|
||||
const latitude = tags.gps?.Latitude;
|
||||
const longitude = tags.gps?.Longitude;
|
||||
return latitude !== undefined && longitude !== undefined
|
||||
? { latitude, longitude }
|
||||
: undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse the width and height of the image from the metadata embedded in the
|
||||
* file.
|
||||
|
||||
Reference in New Issue
Block a user