owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
429 stars 160 forks source link

[web] Image Preview crops images and can't scroll #7728

Closed willmackay closed 11 months ago

willmackay commented 1 year ago

Steps to reproduce

  1. Upload file with wide or tall aspect ratio
  2. Click image file to preview it
  3. Observe image is cropped
  4. Try to scroll cropped part of image into view

Expected behaviour

Scroll functionality to see more of the image would be nice, especially for wide or tall images which get cropped more severely.

Actual behaviour

Image is cropped and no scroll functionality exists to see cropped parts

Environment general

Operating system: Debian 11

Backend (ownCloud Core or Infinite Scale): OCIS

Are you using an external user-backend, if yes which one: No

Environment ownCloud Infinite Scale

Version: 2.0.0-beta8

Updated from an older Infinite Scale or fresh install: Updated from 2.0.0-beta5

Where did you install Infinite Scale from: Binary download on OCIS releases page

Client configuration

Browser: Opera, Firefox

Operating system: Windows, Android

Related issues

Please see https://github.com/owncloud/web/issues/7160 and https://github.com/owncloud/web/issues/6700 for similar issues.

Opera Snapshot_2022-10-03_153258_ocis alyrica net

tbsbdr commented 1 year ago

👍 good point

JammingBen commented 1 year ago

This seems to be a backend issue. I have an image with the size of 4288 x 2844. Now I request a preview from the server:

https://host.docker.internal:9200/remote.php/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157%24c2e72b36-179d-4a39-8d24-a7a696d76797/ESC_large_ISS022_ISS022-E-11387-edit_01.jpeg?scalingup=0&preview=1&a=1&c=cfaee0f51228a2299ec139f1642d88fe&x=4000

The result is a cropped image. The result is cropped as long as the x query param is smaller than the original width of the image. The following results in a not-cropped image:

https://host.docker.internal:9200/remote.php/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157%24c2e72b36-179d-4a39-8d24-a7a696d76797/ESC_large_ISS022_ISS022-E-11387-edit_01.jpeg?scalingup=0&preview=1&a=1&c=cfaee0f51228a2299ec139f1642d88fe&x=5000

We could set preview=0, which also disables the cropping. But then the image is delivered with 100% dimensions - we don't want that. What we basically want for the mediaviewer is to resize the image without cropping it. @C0rby is it possible to introduce an additional crop param to determine this?

michaelstingl commented 1 year ago
CleanShot 2023-01-12 at 17 27 43@2x CleanShot 2023-01-12 at 17 27 51@2x
oC10
web.owncloud.com
oCIS ⚠️
ocis.ocis-web.latest.owncloud.works