diced / zipline

A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!
https://zipline.diced.sh/
MIT License
1.49k stars 140 forks source link

Bug: Images get stretched in a weird way #527

Closed maximmax42 closed 7 months ago

maximmax42 commented 9 months ago

What happened?

The image viewer stretches images sometimes. My screen resolution is 1080p, Chrome's viewport is 1920x919.

Exhibit A

Input (1920x1920)

square-glitch-golden-3840x3840-460

Output

image

Exhibit B

Input (1080x1080)

test2

Output

image

Exhibit C

Input (1080x1920)

test

Output

image

Exhibit D

Input (2160x3840)

test3

Output

image

Version

latest (ghcr.io/diced/zipline or ghcr.io/diced/zipline:latest)

What browser(s) are you seeing the problem on?

Chromium-based (Chrome, Edge, Brave, Opera, mobile chrome/chromium based, etc)

Zipline Logs

No response

Browser Logs

No response

Additional Info

No response

diced commented 8 months ago

By the looks of it, sometimes it seems to be fine and then sometimes it's being stretched/shrinked?

maximmax42 commented 8 months ago

Yeah, pretty much. I can't see any rhyme or reason though.

diced commented 8 months ago

should be fied https://github.com/diced/zipline/commit/f3634eff48ea72cbf6335e718af9a88635286a1c

maximmax42 commented 8 months ago

It doesn't distort now, but big images don't fit the viewport now causing scroll bars to appear.

diced commented 8 months ago

i was able to get shrinking working with big images, but not with small (i thought this would be a fine trade off since i couldn't find out a way to make it work both ways).

Could you tell me what the image width and height was, I'll give it a try on my end.

maximmax42 commented 8 months ago

Interesting, I just checked my test images on phone, and unlike on pc everything displays correctly.

https://stash.maximmax42.ru/naSAf.jpg https://stash.maximmax42.ru/0gbjn.jpg https://stash.maximmax42.ru/baPsL.jpg https://stash.maximmax42.ru/bCY1f.jpg Here are my 4 testing images, all are displayed with scroll bars on my 1080p monitor.

Now that I think about it, I didn't try to do force reload the viewing page after updating Zipline, maybe something from the old version remained. I'll test it later.

maximmax42 commented 8 months ago

Here are my 4 testing images, all are displayed with scroll bars on my 1080p monitor.

Correction: top link (1080x1920) shows up fine, rest have scroll bars.

I didn't try to do force reload the viewing page after updating Zipline, maybe something from the old version remained.

I tried. There definitely was some leftover stuff in cache, but it only fixed one image (see above).

diced commented 7 months ago

Here are my 4 testing images, all are displayed with scroll bars on my 1080p monitor.

Correction: top link (1080x1920) shows up fine, rest have scroll bars.

I didn't try to do force reload the viewing page after updating Zipline, maybe something from the old version remained.

I tried. There definitely was some leftover stuff in cache, but it only fixed one image (see above).

Tested these on my end, 2560x1440 monitor, top and bottom link seem to work (once the image is fully loaded it seems to conform to the viewport), but the middle two links seem to have a vertical scrollbar... no idea why this is happening lol, ill still try out different stuff

diced commented 7 months ago

I think it's fixed here https://github.com/diced/zipline/commit/5b88b597243429d883df70d5ffddf2f474f4a994, I tried it on your images and it seems to be resizing just fine!

maximmax42 commented 7 months ago

Yup, seems to work on my end as well.