immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
53.25k stars 2.82k forks source link

Panorama/photospheres have too wide initial FOV #9801

Open jenda69 opened 6 months ago

jenda69 commented 6 months ago

The bug

If you open a photosphere/panorama image which uses photo-sphere-viewer, the initial view is really wide. image

The OS that Immich Server is running on

Raspberry OS Bookworm

Version of Immich Server

1.105.1

Version of Immich Mobile App

N/A

Platform with the issue

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

1. Open a photosphere image

Relevant log output

No response

Additional information

Changing GPano:InitialHorizontalFOVDegrees and GPano:InitialVerticalFOVDegrees in XMP doesn't do anything, but I don't think photo-sphere-viewer or Immich reads these.

I noticed in web/src/lib/components/asset-viewer/photo-sphere-viewer-adapter.svelte file there's change in maxFov value from defaults. The default one is 90 and Immich uses 180.

The problem is that defaultZoomLvl value is unchanged from 50 and this value is % between maxFov and minFov values according to photo-sphere-viewer documentation. That means by default it's in the middle of FOV 90 and 30 (~60), but because of change in config in Immich, it is now between 180 and 30 (~105). Probably. It seems like fisheye: true option also somehow affects the FOV making it even wider.

I did some testing by overriding photo-sphere-viewer-adapter.Bn82GUZG.js in browser using dev tools and changing the values. To me the best default values are around these:

(...)
minFov: 15,
maxFov: 180,
defaultZoomLvl: 80,
(...)

(I added a cheeky change in minFov too, because the default one has not enough zoom for my photos :-) ).

Could this be changed? Or is there an other way to change the values? I suppose editing the photo-sphere-viewer-adapter.Bn82GUZG.js file and mounting it using docker-compose.yml won't survive update.

edit: uh, just found out in better panorama what the fisheye parameter does - it makes the whole view bulging, vertical lines change to arches... I don't like that at all. So my dream settings are

(...)
minFov: 15,
maxFov: 180,
defaultZoomLvl: 70,
fisheye: false
(...)

For now, I'm mounting modified file (and it's compressed .br and .gz versions) using compose file, but I'd really like to have some kind of better way of customizing these.

waclaw66 commented 6 months ago

Related issue https://github.com/immich-app/immich/issues/7243.

danieldietzler commented 2 months ago

Given the related issue has been fixed and the library had some minor improvements, do you still experience this issue?

jenda69 commented 2 months ago

I do. It still has a fish eye enabled. And the initial view is really wide because of that. The leftmost and rightmost sides of initial view are probably over 180° degrees apart. And I'm on 1080p display with Information panel opened; when I close it, it's even more ridiculous. image