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(web): aspect ratio for photos with Rotate 270 CW orientation #3003

Merged
merged 4 commits into from
Jun 28, 2023

Conversation

brighteyed
Copy link
Contributor

We incorrectly determined the aspect ratio for the photos with Rotate 270 CW orientation. This issue is mentioned in this discussion. This PR fixes it.

@vercel
Copy link

vercel bot commented Jun 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
immich ⬜️ Ignored (Inspect) Jun 28, 2023 5:45pm

@brighteyed
Copy link
Contributor Author

Thank you for your thoughts @uhthomas and @jrasm91. Based on them, I pushed additional changes into this PR:
  * exiftool-vendored disables the print conversion for the Orientation tag. I believe that guarantees we can get only 1-8 values for the orientation. So I safely removed legacy (?) code in thumbnail.svelte that had been checking for Rotate 90 CW and Horizontal (normal) values
  * I removed the -90 value check in getAssetRatio assuming we can get only 1-8 here
  * Added comment to 6 and 8

I guess the use of the orientation tag should be pretty limited in our code. Now we use it only for the calculation of the justified layout.

@alextran1502 alextran1502 merged commit 86562f2 into main Jun 28, 2023
@alextran1502 alextran1502 deleted the fix/aspect-ratio branch June 28, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants