Skip to content
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

fix(server): wrong image dimensions for RAW files (RAF, CR2) (also fixes face preview) #13377

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

C-Otto
Copy link
Contributor

@C-Otto C-Otto commented Oct 11, 2024

For some RAW formats/cameras, the ImageWidth/ImageHeight information represents the dimensions of the preview image, i.e. much smaller than the actual image. This also causes issues with (face/people) thumbnail generation. The information in ImageSize seems to be correct, so we use this instead.

fixes #13049

Copy link
Contributor

@mertalev mertalev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I just made a few suggestions to make it more idiomatic.

server/src/services/metadata.service.ts Outdated Show resolved Hide resolved
server/src/services/metadata.service.ts Outdated Show resolved Hide resolved
server/src/services/metadata.service.ts Outdated Show resolved Hide resolved
@C-Otto C-Otto marked this pull request as draft October 12, 2024 10:24
@C-Otto
Copy link
Contributor Author

C-Otto commented Oct 12, 2024

I'll have a look at your suggestions, thanks. While other weird RAW formats keep popping up, I'm pausing work on this (see discussion in #13049).

@C-Otto C-Otto force-pushed the raw-dimensions branch 3 times, most recently from deeb445 to 96eec57 Compare October 13, 2024 19:05
@C-Otto C-Otto changed the title fix(server): prefer ImageSize over ImageWidth/Height metadata fix(server): wrong image dimensions for RAW files (RAF, CR2, DNG) (also fixes face preview) Oct 15, 2024
@C-Otto C-Otto changed the title fix(server): wrong image dimensions for RAW files (RAF, CR2, DNG) (also fixes face preview) fix(server): wrong image dimensions for RAW files (RAF, CR2) (also fixes face preview) Nov 1, 2024
@C-Otto C-Otto marked this pull request as ready for review November 1, 2024 08:28
@C-Otto
Copy link
Contributor Author

C-Otto commented Nov 1, 2024

@mertalev 🚀?

@C-Otto C-Otto force-pushed the raw-dimensions branch 2 times, most recently from 694ee81 to 2737aab Compare November 1, 2024 13:52
Added Fujifilm X100v RAF RAW File
fix(server): prefer ImageSize over ImageWidth/Height metadata

For some RAW formats/cameras, the ImageWidth/ImageHeight information represents
the dimensions of the preview image, i.e. much smaller than the actual image.
This also causes issues with (face/people) thumbnail generation.
The information in ImageSize seems to be correct, so we use this instead.

fixes #13049
@mertalev mertalev merged commit cdabd08 into main Nov 1, 2024
36 checks passed
@mertalev mertalev deleted the raw-dimensions branch November 1, 2024 14:34
TimVanOnckelen pushed a commit to TimVanOnckelen/immich that referenced this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RAW files (RAF, CR2) have wrong face preview due to wrong dimensions
3 participants