immich icon indicating copy to clipboard operation
immich copied to clipboard

[BUG] Images in landscape orientation have poor resolution in web view

Open rainerwein opened this issue 2 years ago • 3 comments

Describe the bug Generated images in landscape orientation have poor resolution compared to images in portrait orientation

To Reproduce Steps to reproduce the behavior:

  1. Upload image once in landscape and once in portrait resolution (original resolution in my case 4205x2803, resp. 2803x4205)
  2. Click on image to see large view
  3. The landscape version looks pixelated and only has a resolution of 1440x960
  4. The portrait version looks sharper and has a resolution of 1440x2160

Expected behavior Images should have decent resolution for screen regardless of their orientation

Screenshots grafik Image on the left looks worse and pixelated even though the uploaded image had the same resolution grafik grafik

System

  • Browser: Firefox
  • Server Version: v1.43.1

Additional Information I only chose the same image for demonstration purposes. Resolution is worse for all landscape images compared to portrait images. This also isn't just an effect of the landscape image taking up more screen real estate as seen by the different resolution of the generated "preview" image

rainerwein avatar Feb 01 '23 22:02 rainerwein

The landscape version resolution is 1440x960 while the portrait version is 1440x2160. The total pixel is more, so that is probably why

alextran1502 avatar Feb 01 '23 22:02 alextran1502

Yes, that's the bug I'm reporting. The original images have the same number of pixels but the preview that Immich generates produces different resolutions.

rainerwein avatar Feb 01 '23 22:02 rainerwein

This is also noticeable on the demo page, where all landscape images seem to have a low resolution, but when downloaded look totally fine. Of course the effect is less severe for screen resolutions of 1080p or less, but at 1440p it's very apparent.

Maybe this was done intentional for mobile screens where portrait images would take up more screen and therefore would benefit from a higher resolution, but on desktop it's the other way around and therefore the landscape version should have at least the same resolution

rainerwein avatar Feb 01 '23 22:02 rainerwein