[GH-ISSUE #73] ScreenToGif UI isn't per-screen DPI aware #66

Closed
opened 2026-02-26 08:45:10 +03:00 by kerem · 4 comments
Owner

Originally created by @bitcrazed on GitHub (Jan 30, 2017).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/73

Originally assigned to: @NickeManarin on GitHub.

Screen2Gif does not recognize the DPI of the screen on which it is being displayed, and thus renders FAR too big on low-dpi screens (e.g. external 24" screen - top-right) while rendering correctly on high-DPI screen (e.g. my Surface Pro 4's screen - bottom):

External Screens at top, Surface screen below. Surface screen resized to reflect actual physical size)
image

Machine: Surface Pro 4 (12" @ 2736x1824)
External Screens: 2 x Dell U2412M (24" @ 1920x1200)
OS: Windows 10 Insider Build #15024

Originally created by @bitcrazed on GitHub (Jan 30, 2017). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/73 Originally assigned to: @NickeManarin on GitHub. Screen2Gif does not recognize the DPI of the screen on which it is being displayed, and thus renders FAR too big on low-dpi screens (e.g. external 24" screen - top-right) while rendering correctly on high-DPI screen (e.g. my Surface Pro 4's screen - bottom): External Screens at top, Surface screen below. Surface screen resized to reflect actual physical size) ![image](https://cloud.githubusercontent.com/assets/961950/22441032/8c6d4a0c-e6ea-11e6-82f1-676ca6dcb491.png) Machine: Surface Pro 4 (12" @ 2736x1824) External Screens: 2 x Dell U2412M (24" @ 1920x1200) OS: Windows 10 Insider Build #15024
Author
Owner

@NickeManarin commented on GitHub (Jan 31, 2017):

I believe this has something to do with a bug that spoiled recordings with multi-DPI set of screens.

Because the recorder takes into account (while using W8.1 or above) the DPI of the current screen, but the underlying methods that capture the screen does not. Here's an old StackOverflow question.

I could partially solve the bug by making the app unaware of the DPI differences between screens, but I forgot it could turn into a giant window while working with => 150%.

I'm not sure how can I solve this. :/

<!-- gh-comment-id:276233413 --> @NickeManarin commented on GitHub (Jan 31, 2017): I believe this has something to do with a bug that spoiled recordings with multi-DPI set of screens. Because the recorder takes into account (while using W8.1 or above) the DPI of the current screen, but the underlying methods that capture the screen does not. [Here's an old StackOverflow question](http://stackoverflow.com/questions/36818964/dealing-with-multiple-dpi-screens). I could partially solve the bug by making the app unaware of the DPI differences between screens, but I forgot it could turn into a giant window while working with => 150%. I'm not sure how can I solve this. :/
Author
Owner

@NickeManarin commented on GitHub (Jan 31, 2017):

You can download version 2.2 (before the fix) to understand what's happening.

<!-- gh-comment-id:276233973 --> @NickeManarin commented on GitHub (Jan 31, 2017): You can [download version 2.2](https://github.com/NickeManarin/ScreenToGif/releases/tag/2.2) (before the fix) to understand what's happening.
Author
Owner

@bitcrazed commented on GitHub (Feb 2, 2017):

2.2 looks MUCH better and at least scales vaguely sensibly on my multi-DPI setup ;)

FWIW, the High DPI API docs provide guidance on the different types of DPI support from XP -> 7, 8, 8.1, and now Win10, Win10 Anniversary Update.

One thing we've recently added support for in the Windows Console is better handling of WM_DPICHANGED so that we can select the best fonts & UI elements for the screen the Console is being displayed upon, even if it's dragged around from one screen to the next, or the user changes a display's resolution, orientation, etc.

There are some really great High-DPI improvements coming in Win10 Creators Update too :)

Keep up the great work ;)

<!-- gh-comment-id:276829985 --> @bitcrazed commented on GitHub (Feb 2, 2017): 2.2 looks MUCH better and at least scales vaguely sensibly on my multi-DPI setup ;) FWIW, the [High DPI API docs](https://msdn.microsoft.com/en-us/library/windows/desktop/dd464646%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396) provide guidance on the different types of DPI support from XP -> 7, 8, 8.1, and now Win10, Win10 Anniversary Update. One thing we've recently added support for in the Windows Console is better handling of [WM_DPICHANGED](https://msdn.microsoft.com/en-us/library/windows/desktop/dn312083(v=vs.85).aspx) so that we can select the best fonts & UI elements for the screen the Console is being displayed upon, even if it's dragged around from one screen to the next, or the user changes a display's resolution, orientation, etc. There are some really great [High-DPI improvements coming in Win10 Creators Update](https://blogs.windows.com/buildingapps/2016/10/24/high-dpi-scaling-improvements-for-desktop-applications-and-mixed-mode-dpi-scaling-in-the-windows-10-anniversary-update/#6e8ipgcDuOcY3rpZ.97) too :) Keep up the great work ;)
Author
Owner

@NickeManarin commented on GitHub (Feb 2, 2017):

I understand, but v2.2 won't record properly your screen if you drag the recorder to another window with different DPI.

I'll probably have to follow the "Mixed mode" pattern in order to make only the screen recorder window DPI unaware.

<!-- gh-comment-id:277003944 --> @NickeManarin commented on GitHub (Feb 2, 2017): I understand, but v2.2 won't record properly your screen if you drag the recorder to another window with different DPI. I'll probably have to follow the "Mixed mode" pattern in order to make only the screen recorder window DPI unaware.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#66
No description provided.