maxpixelzoom issue with Win10 display scale

  • Hi,

    I recently change my old fullHD (1920*1200px) 24" screen for a 4k (3840*2160px) 32" screen, so I use the 150% display scale on Win10.
    I realize that the maxpixelzoom value of 1 did not prevent pixel scaling of the source image with my new configuration *sad*

    I found a solution by getting the value of window.devicePixelRatio with JS:

    It works fine for flat panorama/image, but for spherical/cube panorama it seems there is another unknown factor XX to be taking account *confused*

  • Hi,

    it's intentionally that the pixelratio is not included in the maxpixelzoom calculation.

    Otherwise it wouldn't be possible to do any zooming when the pano-image itself is not that highres and using a hidpi-screen. That can happen very often especially on mobile devices.

    Originally the pixelratio was even included, but there were several reports about that 'zooming-problem', so it was removed later.

    Btw - the 'window.devicePixelRatio' is already available in krpano as 'device.pixelratio'.

    You could e.g. do also something like this:

    Code
    <view maxpixelzoom="calc:1.0 / device.pixelratio" />

    About the maxpixelzoom on non-flat panos - a pano has a curved surface and not an even pixel-distribution that curviness is included in the calculation.

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!