feat: add some better exif
All checks were successful
Deploy to SFTP Server / build (push) Successful in 10m58s
All checks were successful
Deploy to SFTP Server / build (push) Successful in 10m58s
This commit is contained in:
@ -34,6 +34,7 @@ export async function generateThumbHash(image: { width: number, height: number }
|
||||
const allowedExif = [
|
||||
"ApertureValue",
|
||||
"DateTimeOriginal",
|
||||
"ShutterSpeedValue",
|
||||
"ExposureTime",
|
||||
"ApertureValue",
|
||||
"FNumber",
|
||||
@ -42,6 +43,8 @@ const allowedExif = [
|
||||
"GPSLongitude",
|
||||
"GPSAltitude",
|
||||
"IsoSpeedRatings",
|
||||
"Make",
|
||||
"Model",
|
||||
];
|
||||
|
||||
export async function getExifData(image: ImageMetadata) {
|
||||
@ -56,7 +59,7 @@ export async function getExifData(image: ImageMetadata) {
|
||||
for (const key of allowedExif) {
|
||||
if (!tags[key]) continue;
|
||||
hasExif = true;
|
||||
out[key] = tags[key].description;
|
||||
out[key] = tags[key]?.description;
|
||||
}
|
||||
|
||||
return hasExif ? out : undefined;
|
||||
|
Reference in New Issue
Block a user