My main use case is making a screenshot or partial screenshot, then pasting it as a floating window somewhere in view. I have recently acquired some 4k displays and I am now using those with 2x scaling, e.g.:
output $displaymain {
mode 3840x2160@150Hz
adaptive_sync on
scale 2
}
Observed behaviour:
When I take a screenshot and then paste it (wl-paste | swayimg -s real -w image -), it is 4x the expected size; in other words, it renders the input image (3840x2160) at twice the size in each dimension (7680x4320) when the display scale is set to 2. Or maybe it’s actually the other way around, it treats a scaled display as the scaled resolution (1920x1080) instead of the native one. The result is the same in either case :)
Expected behaviour:
I would expect it to render an image at the actual display resolution, not the scaled one.
Reproduction is quite simple:
set a display to scale 2 in Sway (I would expect it to be the same in other WMs, but that’s what I’m using!)
take a screenshot (e.g. grimshot copy output)
paste the screenshot into swayimg (wl-paste | swayimg -s real -w image -)
observe magnified image display in swayimg
I do also have a single non-scaled display; I disabled it for testing, that is not causing the issue.
Looks like it is a duplicate of #134.
I have two displays with different scale factors and Swayimg works normally only on one of them. I don't know why =)
My main use case is making a screenshot or partial screenshot, then pasting it as a floating window somewhere in view. I have recently acquired some 4k displays and I am now using those with 2x scaling, e.g.:
Observed behaviour:
When I take a screenshot and then paste it (
wl-paste | swayimg -s real -w image -
), it is 4x the expected size; in other words, it renders the input image (3840x2160) at twice the size in each dimension (7680x4320) when the display scale is set to 2. Or maybe it’s actually the other way around, it treats a scaled display as the scaled resolution (1920x1080) instead of the native one. The result is the same in either case :)Expected behaviour:
I would expect it to render an image at the actual display resolution, not the scaled one.
Reproduction is quite simple:
scale 2
in Sway (I would expect it to be the same in other WMs, but that’s what I’m using!)grimshot copy output
)wl-paste | swayimg -s real -w image -
)I do also have a single non-scaled display; I disabled it for testing, that is not causing the issue.