-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat(server): check additional exif date tags #19216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add support for UTC date tags (GPSDateTime, DateTimeUTC, GPSDateStamp, SonyDateTime2) - This matches tags that exiftool-vendored uses for tzSource in extractTzOffsetFromUTCOffset()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we get e2e tests for some of them? Add a sample asset that has (some of) those to test-assets?
'SourceImageCreateTime' as keyof Tags, | ||
]; | ||
'SourceImageCreateTime', | ||
] as Array<keyof ImmichTags>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change this from a type hint to casting the array? With the old way you'd get autocompletion/type hints inside the array which I think is valuable.
try { | ||
const imagePath = join(targetDir, image.filename); | ||
|
||
// Create unique JPEG file using Sharp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a thing for that https://github.com/immich-app/immich/blob/main/e2e/src/generators.ts#L24-L31 so no need to pull sharp in for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PNG images can't have exif
I tried constructing 1 pixel jpg from bytes and sharp always complained of invalid headers or other corruption. So I just decided to use sharp. It's not a new dependency. We already use it :)
Thanks! I have some pictures from Apple devices with only GPSDateTime tags, this should solve the issue :) |
exiftool-vendored
behavior when extracting timezone for an image. (extractTzOffsetFromUTCOffset()
)GPSDateTime
DateTimeUTC
SonyDateTime2
Note: Date-only or Time-only tags will not be considered as a valid DateTime source, but they will still be used to extract the timezone offset by exiftool-vendored.
Fixes the issue reported with the sample photo here: #12650 (comment)