(Wayland) Non sharp image display and broken "Normal Size" zoom option when the compositor has fractional scaling

I have a 2560x1440 monitor and am using Hyprland compositor with scaling 1.3333. "Normal Size" zoom will let the image be 1:1 displayed on the monitor with regard to their pixels. However under my current desktop when I click "Normal Size", the image shows with a smaller size than expected. Say, there's a 2560x1440 image, to reproduce the issue:

  1. Open the image and make ristretto fullscreen
  2. Do "Normal Size"
  3. Observe size of the image view is 1707x960 instead of 2560x1440.

Also, this introduces another issue, which causes imperfect pixels/blurry image display.

Reproduction steps:

  1. Create an image in the same monitor size (2560x1440 in my case)
  2. Draw some simple pixelated patterns on it
  3. Open it using ristretto and go in fullscreen
  4. Click "Zoom fit". Now the image takes up the whole screen.
  5. Grab a screenshot or use some screen magnifier tools to investigate the actual screen pixels.
  6. Observe the image ristretto shows is blurry somehow.

As a comparison:

Run mpv --vo=gpu image.png and press "F" to go fullscreen, and grab a screenshot.

MPV result:

image

Ristretto result:

image

The two images above are what their corresponding screenshot looks like in GIMP when zoomed a lot. MPV result is expected.

Edited by bczhc