Reply to post

Hot!Windows 11 rounded corner on HiDPI displays

Author
leowang
User
  • Total Posts : 0
  • Scores: 0
  • Reward points: 0
  • Joined: 2022/01/10 22:49:32
  • Status: offline
2022/01/11 11:31:02 (permalink)
0

Windows 11 rounded corner on HiDPI displays

In Windows 11, HyperSnap captures window with rounded corner, but in scaled mode, e.g., 200% or 250% zoom level, HyperSnap captures the window corner with a smaller radius, thus leaving a rounded edge which consists of:
 
A white corner
+
Background content inside a rounder corner with smaller radius
+
Window content
 
I can't upload the screenshot file directly. Here is the imgbb viewer link:
 
https://ibb.co/Ptz671F
 
Please check, thank you.

18 Replies Related Threads

    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/11 15:44:15 (permalink)
    0
    Thank you for letting me know! I'll see what I can do about this. Unfortunately there is no way to know programmatically what the exact shape of the window is under Windows 11 system, so I'll have to guess. There are also some windows that don't have round corners, and again there is no way for me to know about it from within the program code. Maybe there should be an option in HyperSnap to try to guess and capture the rounded corners, or just capture a rectangular region, depending on users' preferences.
     
    Greg
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/12 06:08:49 (permalink)
    0
    The dimensions are well documented. Please take a look at
     
    https://docs.microsoft.com/en-us/windows/apps/design/signature-experiences/geometry
     
    For example, the value of the radius of the rounded corners of the top-level windows, it is 8 * PPI_Of_Current_Display / 96.
     
    An option that switches between a rectangular and a rounded window is a good idea.
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/13 13:27:22 (permalink)
    0
    Please check version 8.20, just posted on this web site, hopefully it will work better for you.
     
    Greg
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/14 10:40:55 (permalink)
    0
    I upgraded to 8.20. HyperSnap seems like not DPI-aware and the snapped pictures are the same as before: the rounded corner still contains the background color.
     
    The screenshot: https://ibb.co/Vw1v3pQ
     
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/14 15:56:33 (permalink)
    0
    I only see some black pixels on your screenshot and don't understand what exactly was captured and on which monitor, what was its resolution etc. You may need to make the background pixels transparent under HyperSnap's Capture Settings screen.
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/14 21:06:46 (permalink)
    0
    The screenshot is about the DPI-awareness: you can see the resolution of the background program (the chessboard, the pieces and the texts on the ribbon bar are all sharp) and HyperSnap's buttons and texts are coarse.
     
    In 8.19 HyperSnap's interface is fine.
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/14 21:27:01 (permalink)
    0
    This is what HyperSnap captured in Window mode: https://ibb.co/NsTb7gM
     
    This is my desktop: https://ibb.co/sVCGst5
     
    As you can see, the left corner also contains part of the Acrobat Reader icon.
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/14 22:31:24 (permalink)
    0
    Windows 11's renderer blends the window border with the background content, I think there are two options to get the accurate window bitmap:
     
    1. Use DwmSetWindowAttribute API to prevent the window be rounded.
     
    https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute
     
    This is the best option IMO.
     
    2. Create a pure white borderless window just under the window to capture to prevent any bitmap blending. This will leave a gray rounded margin outside the window rounded corner: the alpha mask layer, see the screenshot.
     
    https://ibb.co/NY2mVGN
     
    A pure black background seems to have better effect
     
    https://ibb.co/mNnB8Tm
     
    but there are several white pixels on the top-left corner, I think it is a HyperSnap bug: the flashing rectangle remains some pixels there.
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/15 14:14:02 (permalink)
    0
    I use the background approach for now, although maybe giving the user an option to choose - capture rounder corners or not - would be useful too. As for the color - white, black, any other or transparent - you may set it under HyperSnap "Capture Settings" button - Capture tab.
     
    The trick is to get right the corner radius, taking into account each monitor dpi resolution and scaling. Maybe this time I got it right, if you want, try ver. 8.20.01, just posted to this web site.
     
    Greg
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/15 15:09:49 (permalink)
    0
    I have tried 8.20.01 and found two problems.
     
    1. I misunderstood the geometry guide (sorry for that), the radius is by the number of physical pixels, not logical, so it shouldn't be multiplied by current DPI then divided by 96.
     
    The outer frame of the captured window seems one or two pixels smaller than the actual size. As you can see, the left border of the Notepad window is missing, and other borders are thinner than they actually are.
     
    https://ibb.co/Qbqq2nf
     
    2. After several window captures, HyperSnap always captures all-white window content. I guess the white background window is put on the top of the window to capture by mistake.
     
    https://ibb.co/86TbRKx
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/19 08:33:13 (permalink)
    0
    I deliberately omit this border, as it is not a solid color, but partially transparent, so it captures random pixels of the background. It did not look right to me.
     
    Which capture operation do you use when you get all-white content, exactly? Which hotkey or which capture button do you press to reproduce this? I repeated "Capture Active Window" with Ctrl+Shift+A combination on different target windows, but could not reproduce this problem.
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/19 10:24:14 (permalink)
    0
    > I deliberately omit this border, as it is not a solid color, but partially transparent, so it captures random pixels of the background. It did not look right to me.
     
    That will lose the left border. See the picture.
     
    https://ibb.co/p4NhPnP
     
    A Notepad window on a pure-white background doesn't have random pixels on the corners. Because of the anti-aliasing processing, they are not pure color.
     
    https://ibb.co/mR0q6Yt
     
    > Which capture operation do you use when you get all-white content, exactly? Which hotkey or which capture button do you press to reproduce this
     
    I forgot to mention that only happened when the target window belongs to processes ran from Administrator. The 'Snipping Tool' comes with Windows 11 can capture the content of the windows of such type without problems.
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/19 13:09:26 (permalink)
    0
    I guess the "Clear transparency for Window Capture" setting takes care of these random background pixels. OK, I'll change the window region again to correct his. Version 8.20.02 should have this change.
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/20 17:08:56 (permalink)
    0
    This adjustment for window captures is now available in HyperSnap 8.21 (or any later) found on this site.
     
    Greg
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/21 11:10:54 (permalink)
    0
    Both problems are fixed in 8.21. Thank you.
     
    I unchecked "Clear Transparency for Window captures", but the rounded corners are cleared.
     
    Another problem is: if a top-level window is not rounded by it's developer's choice, e.g., RegexBuddy, it's About window is rounded by HyperSnap:
     
    https://ibb.co/pdN00vc
     
    but in fact it's not rounded:
     
    https://ibb.co/60rMSDL
     
    You can download a trial version
     
    https://www.regexbuddy.com/download.html
     
    to test it.
     
    If the option "Clear Transparency for Window captures" works correctly, unchecking it should make things right.
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/21 14:37:31 (permalink)
    0
    Thank you, I made a small correction to check for rounded corners or not, but can't test it on RegEx Buddy, they don't have a free trial. I did not update the version number for this small change, if you want, download ver. 8.21 again, install on top of your current one and test. Thank you for your help!
     
    Greg
    leowang
    User
    • Total Posts : 0
    • Scores: 0
    • Reward points: 0
    • Joined: 2022/01/10 22:49:32
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/23 10:42:28 (permalink)
    0
    The updated version 8.21 doesn't fix the problem. There is another software from the same vendor: PowerGrep. You can download the trial version at:
     
    https://www.powergrep.com/download.html#trial
     
    The problem is the same.
     
    The option 'Clear transpareny' seems having no effect whether checked or not.
    Admin
    Administrator
    • Total Posts : 275
    • Scores: 6
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Windows 11 rounded corner on HiDPI displays 2022/01/25 08:09:56 (permalink)
    0
    Thank you, the About window of this app indeed has no rounded corners. At this time I don't know how I could discover this fact programmatically and change the capture shape. Will investigate, if time permits.
    Jump to:
    © 2022 APG vNext Commercial Version 5.1