Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HiDPI scaling not handled correctly under windows #590

Closed
mjverbeek opened this issue Feb 21, 2021 · 26 comments
Closed

HiDPI scaling not handled correctly under windows #590

mjverbeek opened this issue Feb 21, 2021 · 26 comments
Assignees
Projects

Comments

@mjverbeek
Copy link

I'm seeing this on my 4K laptop monitor using ksnip 1.8.1 build 1686.d6b138b
3840 x 2160 225% scaling.

I've seen this behaviour before, in prior versions.
Just wanted to share.

This is what I see on my monitor:

image

As soon as I start 'take screenshot' with ksnip screen is aprox 1/4 of the monitor: (1/225% ?)

image

This is the area I select for screenshot:

image

And this is the result:

image

@DamirPorobic
Copy link
Member

Interesting, you're having this issue with Windows.

Dual monitor or single monitor?

@DamirPorobic DamirPorobic added this to To do in v1.9.0 via automation Feb 21, 2021
@mjverbeek
Copy link
Author

I've read about this issue with dual monitor in Linux.
Windows version = 20H2 19042.804
Video card = Intel HD Graphics 630 & NVIDIA GeForce GTX 1050

@mjverbeek
Copy link
Author

addition:

with scaling 100% and reboot, I don't have the issue
back to 225% I don't have the issue, though screen is bit messy until reboot
and after the reboot the issue is back again

@DamirPorobic
Copy link
Member

Sorry I didn't get if you have Notebook + Monitor or just Notebook?

@mjverbeek
Copy link
Author

Just notebook.

@DamirPorobic DamirPorobic removed this from To do in v1.9.0 Feb 21, 2021
@DamirPorobic DamirPorobic added this to To do in v1.8.2 via automation Feb 21, 2021
@eff-sunny
Copy link

Hi,

I have exactly the same problem, but with 1920 x 1080 laptop screen with 150% scaling.

Windows 10 Enterprise (version 2004, build 19041.804)
Video card: Intel(R) UHD Graphics 620

@DamirPorobic
Copy link
Member

@eff-sunny thanks for reporting, I'll try to reproduce.

@timrichardson
Copy link

timrichardson commented Mar 10, 2021

I have this problem too, on ubuntu 20.10, with snap and app image, 1.8.1 and "1.9.0".
not a wayland session.

If ksnip launches on my primary monitor (which it always does), it assumes it is in hidpi mode, and when I move any part of the application window to a second monitor, it becomes tiny. My primary monitor is 4K, but not hidpi. My other monitors are also not hidpi, but a more normal resolution (they are both 1920x1200).

Also, when doing a rectangular area screenshot, it is effectively unusable. It is hard to describe: I seem to see all monitors shrunk so much that I can't see what I am selecting.

@timrichardson
Copy link

I installed from flatpak. Then the session crashed, so I logged out and in again, and it works much better. The appimage and snap were also badly themed, but the flatpak version looks much better. It also works properly.

@DamirPorobic
Copy link
Member

@timrichardson I don't think that you have the same issue, sounds different then what @eff-sunny has. His issue is hdpi related and single monitor. You have dual monitors without hidpi. I think I would look a new issue for that.

@timrichardson
Copy link

I have a hidpi issue: the app thinks my 4K screen is hidpi, and everything goes badly after that., because it is just wrong about that. The zoom client does it too (a qt bug), but in zoom, there is a setting to turn "auto hidpi detection" off.

However, I will file a new issue.

@DamirPorobic
Copy link
Member

@mjverbeek what Linux Distro and Desktop Manager are you using?

@mjverbeek
Copy link
Author

Not Linux, I'm on Windows 20H2 19042.867
Single monitor 3840 x 2160 225% scaling.

@DamirPorobic
Copy link
Member

Oh, sorry, my wrong. Thanks for clarifying.

@DamirPorobic
Copy link
Member

Ok, I can reproduce this issue. It seems to be a regression introduced after releasing 1.8.0.

@DamirPorobic DamirPorobic self-assigned this Mar 18, 2021
@DamirPorobic DamirPorobic moved this from To do to In progress in v1.8.2 Mar 18, 2021
@DamirPorobic DamirPorobic changed the title Screen scaling on 4K monitor Snipping area not correctly scaled with HiDPI on Windows Mar 18, 2021
@DamirPorobic DamirPorobic changed the title Snipping area not correctly scaled with HiDPI on Windows HiDPI scaling not handled correctly under windows Mar 20, 2021
@DamirPorobic
Copy link
Member

@mjverbeek @eff-sunny I have pushed a change that should fix this issue. Can you test if it's working for you now? Just give the CI a couple of minutes to finish.

@mjverbeek
Copy link
Author

I will check this fix. But where can I find it? And what is CI?
Sorry, not an experienced githubber

@DamirPorobic
Copy link
Member

All good, you can find it here https://github.com/ksnip/ksnip/releases/tag/continuous

The CI is the server that builds those packages and uploads them to that page. Any window build that you see from now on there should already contain the fix.

@mjverbeek
Copy link
Author

I tried with ksnip-1.9.0-continuous-windows.zip
The screen doesn't scale anymore and the cutout is right.
However, the dpi of the resulting screenshot is degraded.

The first image is made with SnagIt (very old version)

screenshot

This image is made with ksnip, which I like much more than SnagIt

ksnip_20210320-125035

@DamirPorobic
Copy link
Member

Was this before like that or is it something new introduced with my change?

@DamirPorobic
Copy link
Member

Oh, and is it pixelated only on the saved image or in the annotator already?

@mjverbeek
Copy link
Author

As far as I know this was introduced with this change.
Because before the image never represented what I selected I didn't pay much attention to the result.
But in the initial post (on top of this thread) the resulting picture looks alright.

I saw it in the editor and saved it to check if it was there too. And it did, so both in editor and saved file are pixelated.

@DamirPorobic
Copy link
Member

DamirPorobic commented Mar 20, 2021

I cannot reproduce that, here is screenshot taken with 225% scaling:
ksnip:
ksnip_20210320-154509

Windows Snipping Tool:
snipping_tool

They look the same to me.

Is the background image pixelated for you when you are selecting the rect for a screenshot?

@mjverbeek
Copy link
Author

I stopped ksnip, deleted HKCU/SOFTWARE/ksnip, started ksnip and now the pixelation is gone.
So there must have been a setting causing it.

@mjverbeek
Copy link
Author

AutoCopyToClipboardNewCaptures = true will pixelate
False or not set will not pixelate
Background picture is not pixelated while selecting

@DamirPorobic
Copy link
Member

Yes, you're right I can reproduce it. I'll log for that another issue and close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

4 participants