artemsen / swayimg

Image viewer for Wayland
MIT License
380 stars 31 forks source link

HiDPI - expected resolution not applied under scaled output #134

Open ChrisRenfrow opened 5 months ago

ChrisRenfrow commented 5 months ago

I saw #15 but am unsure whether this is related or a different issue.

I am using a dual monitor setup, one scaled by 1.5x, the other not scaled at all. When images are opened by swayimg in any terminal (Alacritty, foot) under the scaled output, swayimg is very blurry. If opened under the unscaled output, the resolution is as expected.

Scaled 1.5x (595x325): 2024-06-04-140226_grim Un-scaled (596x258): 2024-06-04-140203_grim

These screen-grabs are roughly the same width (see dimensions) so it should accurately demonstrate the issue. I am using version 2.2 of swayimg with the default config outside of font selection and setting a background color. Let me know if there's any additional information I can provide that may help!

artemsen commented 5 months ago

I reproduced the bug. But at the moment I have no idea how to fix this =) For some reason, composer doesn't send the scaling factor for one of my displays, so the image buffer defaults to a 1:1 ratio.

ChrisRenfrow commented 5 months ago

No worries! Thanks for taking the time to look into it. :)