Page 1 of 1

[0.99.6] "Fit image to window" incorrect on retina

Posted: Wed Dec 22, 2021 9:44 am
by lolmaus
Hi! Using 0.99.6 64-bit on Windows 10 Pro.

When I use "Auto image size" → "Fit image to window" on a non-retina display, the result is correct:

Image

However, when I move the window to a retina display, the image is resized incorrectly. Here's an example for a 150% retina factor:

Image

Apparently, some part of XnViewMP is accounting for the retina factor in its calculation while another part doesn't.

Re: [0.99.6] "Fit image to window" incorrect on retina

Posted: Wed Dec 22, 2021 10:05 am
by lolmaus
I would like to add that this hasn't been the case previously. This bug is a regression introduced at some point.

Re: [0.99.6] "Fit image to window" incorrect on retina

Posted: Wed Dec 22, 2021 12:18 pm
by xnview
it was always like, if you click on 'fit image to window'?

Re: [0.99.6] "Fit image to window" incorrect on retina

Posted: Wed Dec 22, 2021 12:29 pm
by lolmaus
xnview wrote: Wed Dec 22, 2021 12:18 pm it was always like, if you click on 'fit image to window'?
I don't understand the question, please rephrase.

I would like to add that this happens only to images that are smaller and should be stretched in "Fit image to window" mode. Images that are larger and should be shrunk are fine.

Re: [0.99.6] "Fit image to window" incorrect on retina

Posted: Wed Dec 22, 2021 1:50 pm
by xnview
Perhaps you had 'settings>View>Zoom on HiDPI screen...'?

Re: [0.99.6] "Fit image to window" incorrect on retina

Posted: Wed Dec 22, 2021 1:55 pm
by lolmaus
xnview wrote: Wed Dec 22, 2021 1:50 pm Perhaps you had 'settings>View>Zoom on HiDPI screen...'?
Yes, unchecking that checkbox resolved my issue, thanks!

But I still think there's a problem with it enabled. If that behavior is intentional, why does it only affect smaller images?

Re: [0.99.6] "Fit image to window" incorrect on retina

Posted: Wed Dec 22, 2021 2:27 pm
by xnview
lolmaus wrote: Wed Dec 22, 2021 1:55 pm But I still think there's a problem with it enabled. If that behavior is intentional, why does it only affect smaller images?
On HiDPI screen, when enabled the image size doesn't use pixel scaling

Re: [0.99.6] "Fit image to window" incorrect on retina

Posted: Thu Dec 23, 2021 5:07 am
by lolmaus
Well, this option breaks "Fit to window" for smaller images, doesn't it?

Re: [0.99.6] "Fit image to window" incorrect on retina

Posted: Thu Dec 23, 2021 7:33 am
by xnview
lolmaus wrote: Thu Dec 23, 2021 5:07 am Well, this option breaks "Fit to window" for smaller images, doesn't it?
No, why? Perhaps i don't understood the problem?