immich
immich copied to clipboard
feat (web/server) 360 degrees Web panoramas
In this PR I aded
- Support for 360 Panoramas as it was discussed here: https://github.com/immich-app/immich/discussions/1630
- Minor technical changes and improvements
How it was implemented
- Once an images is uploaded, in metadata-extraction.processor.ts it checks aspectRatio. If it is aspectRatio >= 2, we assume that it is a panorama. This can be potentialy improved, but looks like a common way to determine if image is a panorama or not
- If it is a panorama, we add a prtoperty isPanorama: true
- We use library @egjs/svelte-view360 to show the panoram
- In the library we use a special symbol to display if a thumb is a panorama.
Minor technical changes and improvements:
- restart:always for all docker containers in development docker-compose
- Fixed links in database-migrations.md file
Potential further improvements:
- Probably we can switch library and use smth else. But this liibrary works OK both on desktop and mobile-web
- Support panoramas in Flutter mobile app
- There 360 videos. Later we can support them as well
Here is thumb that shows a panorama:
Panorama after is opened:
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
immich | ⬜️ Ignored (Inspect) | Visit Preview | Jul 23, 2023 5:54pm |
Probably I need to add some tests, but not sure. Need some advise. Also I am not 100% sure that I properly fixed open-api-doc. Please help me with this stuff. Thanks
For further steps for improvement we can add a "panorama" filter here:
Hi! Do you have any ideas what can be improved in this PR? Can we merge it? :)
@dmitry-brazhenko hello, I haven't gotten a chance to review the PR yet. Once I do and if there is nothing else to address, it will be merged. Thank you for the contribution
I think there is some issue with the recent rebase/merge, can you only include the changes to the panorama view?
After I ran "make api" - it resulted to multiple file changes
These changes somehow reverting some of the changes that we made. How about you only include the changes in the server
and mobile
and leave the API generation for me?
Yes, I will do that
@alextran1502 I reverted my attempts to merge main branch to my branch. Could you help me with merging please? Thanks
@alextran1502 would you mind if merge docker compose improvement and MD fix in a separate PR?
Fixes #2610 and #1630.
If it is aspectRatio >= 2, we assume that it is a panorama
I think 360 panoramas should be detected more reliably in this PR. Currently, the code assumes that all images with an aspect ratio >= 2 are 360 panoramas.
But, for example:
- Screenshots with landscape orientation should not be detected as 360 panoramas
- Non-360 panoramas (for example, with cylindrical projection) should not be detected as 360 panoramas
I believe we should use the EXIF tag ProjectionType
to detect 360 panoramas in addition to the aspect ratio check
If it is aspectRatio >= 2, we assume that it is a panorama
I think 360 panoramas should be detected more reliably in this PR. Currently, the code assumes that all images with an aspect ratio >= 2 are 360 panoramas.
But, for example:
* Screenshots with landscape orientation should not be detected as 360 panoramas * Non-360 panoramas (for example, with cylindrical projection) should not be detected as 360 panoramas
I believe we should use the EXIF tag
ProjectionType
to detect 360 panoramas in addition to the aspect ratio check
I agree. My google pixel photosphere images have the following projection type:
Projection Type : equirectangular
I also have photoshere images that are not complete 360 degree images so the aspect ratio is not 2:1.
@CodeWithMa @brighteyed you're right. I fixed panorama detection. Now it consumes Exif and marks images by "panorama" only if there is a necessary exif tag.
@alextran1502 Could you help me with merging this PR?
Thanks
Can you create another PR to consolidate the changes on the web and the server? Please put migrations into a single file. Once you've done that please ping me and I can help generating the API
Will go on in this PR: https://github.com/immich-app/immich/pull/3412.
Implemented Projectiontype as enum